[Core] exit() can prevent core dumping, use abort() instead on debug mode

This commit is contained in:
0penBrain
2021-08-18 18:12:31 +02:00
parent 6c977d8511
commit f976699bdf

View File

@@ -1631,7 +1631,11 @@ void segmentation_fault_handler(int sig)
(void)sig;
std::cerr << "Program received signal SIGSEGV, Segmentation fault.\n";
printBacktrace(2);
#if defined(FC_DEBUG)
abort();
#else
exit(1);
#endif
#else
switch (sig) {
case SIGSEGV: