diff options
author | Erlang/OTP <[email protected]> | 2016-08-11 16:23:45 +0200 |
---|---|---|
committer | Erlang/OTP <[email protected]> | 2016-08-11 16:23:45 +0200 |
commit | b008a1912290d18175a1871f2b6aa2932c8ed6b2 (patch) | |
tree | e4483c5c41dce74f58cd9159303a38bc85bcd2cc | |
parent | 4e9c137e708178319d63a143e802fdbd2e628651 (diff) | |
parent | ee32dcfea7d93c81c3d03489d9888e4baf523f2e (diff) | |
download | otp-b008a1912290d18175a1871f2b6aa2932c8ed6b2.tar.gz otp-b008a1912290d18175a1871f2b6aa2932c8ed6b2.tar.bz2 otp-b008a1912290d18175a1871f2b6aa2932c8ed6b2.zip |
Merge branch 'rickard/erl-crash-dump-bug/OTP-13799' into maint-19
* rickard/erl-crash-dump-bug/OTP-13799:
Avoid segfault when printing slogan after crashdumping
-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 fbdafec4ef..0a396bb069 100644 --- a/erts/emulator/beam/erl_init.c +++ b/erts/emulator/beam/erl_init.c @@ -2350,14 +2350,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) |