diff options
author | Erlang/OTP <[email protected]> | 2016-08-11 16:24:01 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-08-11 16:24:01 +0200 |
commit | 290520c49a4f6366d7a27ca765275d0a1174497c (patch) | |
tree | e099f58eaacc71fbe4b985f161b30bd265ed1d91 /erts | |
parent | 44b2c3e91509f210c2ad18eb296e34b61e0f52cb (diff) | |
parent | ee32dcfea7d93c81c3d03489d9888e4baf523f2e (diff) | |
download | otp-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')
-rw-r--r-- | erts/emulator/beam/erl_init.c | 5 |
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) |