aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_init.c
diff options
context:
space:
mode:
authorErlang/OTP <[email protected]>2016-08-11 16:24:01 +0200
committerErlang/OTP <[email protected]>2016-08-11 16:24:01 +0200
commit290520c49a4f6366d7a27ca765275d0a1174497c (patch)
treee099f58eaacc71fbe4b985f161b30bd265ed1d91 /erts/emulator/beam/erl_init.c
parent44b2c3e91509f210c2ad18eb296e34b61e0f52cb (diff)
parentee32dcfea7d93c81c3d03489d9888e4baf523f2e (diff)
downloadotp-290520c49a4f6366d7a27ca765275d0a1174497c.tar.gz
otp-290520c49a4f6366d7a27ca765275d0a1174497c.tar.bz2
otp-290520c49a4f6366d7a27ca765275d0a1174497c.zip
Merge branch 'rickard/erl-crash-dump-bug/OTP-13799' into maint-18
* rickard/erl-crash-dump-bug/OTP-13799: Avoid segfault when printing slogan after crashdumping
Diffstat (limited to 'erts/emulator/beam/erl_init.c')
-rw-r--r--erts/emulator/beam/erl_init.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_init.c b/erts/emulator/beam/erl_init.c
index e729574ec7..b4d5bf8fb6 100644
--- a/erts/emulator/beam/erl_init.c
+++ b/erts/emulator/beam/erl_init.c
@@ -2256,14 +2256,15 @@ erts_exit_vv(int n, int flush_async, char *fmt, va_list args1, va_list args2)
if (erts_mtrace_enabled)
erts_mtrace_exit((Uint32) n);
+ if (fmt != NULL && *fmt != '\0')
+ erl_error(fmt, args2); /* Print error message. */
+
/* Produce an Erlang core dump if error */
if (((n == ERTS_ERROR_EXIT && erts_no_crash_dump == 0) || n == ERTS_DUMP_EXIT)
&& erts_initialized) {
erl_crash_dump_v((char*) NULL, 0, fmt, args1);
}
- if (fmt != NULL && *fmt != '\0')
- erl_error(fmt, args2); /* Print error message. */
sys_tty_reset(n);
if (n == ERTS_INTR_EXIT)