[common] crash/linux: generate core dump when handling SIGSEGV

Calling abort() instead of exit() will generate a core dump, allowing gdb
to be used when the client crashes. This is desirable for the following
reasons:

1. gdb can be used to inspect the call stack with far more detail than the
   our quick stack trace code, and also allows the access to the heap.
2. Our SIGSEGV handler is unable to use debug symbols for shared libraries,
   making it impossible to debug bugs involving drivers and similar.
This commit is contained in:
Quantum 2021-02-26 17:56:44 -05:00 committed by Geoffrey McRae
parent 31c1452451
commit 5ad70ccc41

View file

@ -215,7 +215,7 @@ static void crit_err_hdlr(int sig_num, siginfo_t * info, void * ucontext)
DEBUG_ERROR("signal %d (%s), address is %p", sig_num, strsignal(sig_num), info->si_addr);
printBacktrace();
cleanupCrashHandler();
exit(EXIT_FAILURE);
abort();
}
bool installCrashHandler(const char * exe)