From: Michel Dänzer <[email protected]>

Without this, assertion failures make life hard for users and those
trying to help them.

Signed-off-by: Michel Dänzer <[email protected]>
---
 os/osinit.c | 1 +
 os/utils.c  | 6 ++++++
 2 files changed, 7 insertions(+)

diff --git a/os/osinit.c b/os/osinit.c
index 5b2f6b546..cd769d181 100644
--- a/os/osinit.c
+++ b/os/osinit.c
@@ -173,6 +173,7 @@ OsInit(void)
         int i;
 
         int siglist[] = { SIGSEGV, SIGQUIT, SIGILL, SIGFPE, SIGBUS,
+            SIGABRT,
             SIGSYS,
             SIGXCPU,
             SIGXFSZ,
diff --git a/os/utils.c b/os/utils.c
index 3f8bac5c6..226b9c817 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -1353,6 +1353,12 @@ OsAbort(void)
 #ifndef __APPLE__
     OsBlockSignals();
 #endif
+#if !defined(WIN32) || defined(__CYGWIN__)
+    /* abort() raises SIGABRT, so we have to stop handling that to prevent
+     * recursion
+     */
+    OsSignal(SIGABRT, SIG_DFL);
+#endif
     abort();
 }
 
-- 
2.11.0

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to