sal/osl/unx/signal.cxx |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 8d18a78e91778db61db280f596011bfe0a80d570
Author: Markus Mohrhard <markus.mohrh...@googlemail.com>
Date:   Wed Mar 15 03:15:01 2017 +0100

    improve the breakpad signal handler in dbgutil builds
    
    Change-Id: I253058dbfc9e156bc778c23d491b642c538606f2
    Reviewed-on: https://gerrit.libreoffice.org/35227
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com>

diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 55c7765..f4c9a9c 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -177,6 +177,20 @@ bool is_soffice_Impl()
     return (idx != -1);
 }
 
+#if HAVE_FEATURE_BREAKPAD
+bool is_unset_signal(int signal)
+{
+#ifdef DBG_UTIL
+    return (!bSetSEGVHandler && signal == SIGSEGV) ||
+        (!bSetWINCHHandler && signal == SIGWINCH) ||
+        (!bSetILLHandler && signal == SIGILL);
+#else
+    (void) signal;
+    return false;
+#endif
+}
+#endif
+
 }
 
 bool onInitSignal()
@@ -446,9 +460,9 @@ void signalHandlerFunction(int signal, siginfo_t * info, 
void * context)
     }
 
 #if HAVE_FEATURE_BREAKPAD
-    if (Info.Signal == osl_Signal_AccessViolation ||
+    if ((Info.Signal == osl_Signal_AccessViolation ||
             Info.Signal == osl_Signal_IntegerDivideByZero ||
-            Info.Signal == osl_Signal_FloatDivideByZero)
+            Info.Signal == osl_Signal_FloatDivideByZero) && 
!is_unset_signal(signal))
     {
         for (SignalAction & rSignal : Signals)
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to