Skip to content

Commit 43f78a4

Browse files
Fix SIGABRT not causing a core dump
A second abort() is needed at the end of `SigAbrtHandler()` to trigger the SIG_DFL action (in this case the core dump). Also since `AttachDebugger()` disables the ability to dump core, so it gets reenabled after returning from it.
1 parent 520aed6 commit 43f78a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/base/application.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,12 @@ void Application::SigAbrtHandler(int)
776776
}
777777

778778
AttachDebugger(fname, interactive_debugger);
779+
780+
#ifdef __linux__
781+
prctl(PR_SET_DUMPABLE, 1);
782+
#endif /* __linux __ */
783+
784+
abort();
779785
}
780786

781787
#ifdef _WIN32

0 commit comments

Comments
 (0)