From 43f78a4b86d2e1be3ca6ca43c0106518b72c008c Mon Sep 17 00:00:00 2001 From: Johannes Schmidt Date: Wed, 23 Apr 2025 09:13:04 +0200 Subject: [PATCH] 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. --- lib/base/application.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/base/application.cpp b/lib/base/application.cpp index 89a0f55a2..e450b3300 100644 --- a/lib/base/application.cpp +++ b/lib/base/application.cpp @@ -776,6 +776,12 @@ void Application::SigAbrtHandler(int) } AttachDebugger(fname, interactive_debugger); + +#ifdef __linux__ + prctl(PR_SET_DUMPABLE, 1); +#endif /* __linux __ */ + + abort(); } #ifdef _WIN32