[Libreoffice-commits] core.git: sal/osl
Markus Mohrhard
markus.mohrhard at googlemail.com
Wed Mar 15 15:55:59 UTC 2017
sal/osl/unx/signal.cxx | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
New commits:
commit 20339900683f0d29f5235ebd494e29bc62b053fd
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Mar 15 03:06:16 2017 +0100
workaround for breakpad signal handler on linux
The breakpad signal handler is overwritten by our own signal handler
during startup. As a workaround we use the same approach as in the
windows code and add call the old signal handler if a crash was
registered.
Change-Id: I1179fd9cba851734aa1686168f231cf68de57c1a
Reviewed-on: https://gerrit.libreoffice.org/35226
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx
index 2cf6d7e..55c7765 100644
--- a/sal/osl/unx/signal.cxx
+++ b/sal/osl/unx/signal.cxx
@@ -445,6 +445,30 @@ void signalHandlerFunction(int signal, siginfo_t * info, void * context)
break;
}
+#if HAVE_FEATURE_BREAKPAD
+ if (Info.Signal == osl_Signal_AccessViolation ||
+ Info.Signal == osl_Signal_IntegerDivideByZero ||
+ Info.Signal == osl_Signal_FloatDivideByZero)
+ {
+ for (SignalAction & rSignal : Signals)
+ {
+ if (rSignal.Signal == signal)
+ {
+ if (rSignal.siginfo)
+ {
+ (*reinterpret_cast<Handler2>(rSignal.Handler))(
+ signal, info, context);
+ }
+ else
+ {
+ rSignal.Handler(signal);
+ }
+ break;
+ }
+ }
+ }
+#endif
+
switch (callSignalHandler(&Info))
{
case osl_Signal_ActCallNextHdl:
More information about the Libreoffice-commits
mailing list