diff options
author | Rickard Green <[email protected]> | 2016-08-11 15:52:31 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2016-08-11 16:22:41 +0200 |
commit | ee32dcfea7d93c81c3d03489d9888e4baf523f2e (patch) | |
tree | 6a7602c751e1295d2d112d6513886bbfdc1612ec /erts | |
parent | 74a95b3d511177a9b35c2b0272b9ca5511b6f750 (diff) | |
download | otp-ee32dcfea7d93c81c3d03489d9888e4baf523f2e.tar.gz otp-ee32dcfea7d93c81c3d03489d9888e4baf523f2e.tar.bz2 otp-ee32dcfea7d93c81c3d03489d9888e4baf523f2e.zip |
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 d9c3b0dcf4..51b72033ca 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -2262,14 +2262,15 @@ erl_exit_vv(int n, int flush_async, char *fmt, va_list args1, va_list args2) if (erts_mtrace_enabled) erts_mtrace_exit((Uint32) an); + if (fmt != NULL && *fmt != '\0') + erl_error(fmt, args2); /* Print error message. */ + /* Produce an Erlang core dump if error */ if (((n > 0 && 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) |