summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-15 03:15:01 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-03-15 16:32:18 +0000
commit8d18a78e91778db61db280f596011bfe0a80d570 (patch)
tree497b5a46a94a542660242ab5e564825b7a5b2e71 /sal
parent875b81ec6f6fbbaa4801807c00da00c567caaa95 (diff)
improve the breakpad signal handler in dbgutil builds
Change-Id: I253058dbfc9e156bc778c23d491b642c538606f2 Reviewed-on: https://gerrit.libreoffice.org/35227 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/signal.cxx18
1 files changed, 16 insertions, 2 deletions
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 55c7765b5d8a..f4c9a9ce5171 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)
{