Deliver SIGILL, SIGBUS and SIGSEGV always in an "unsafe" manner.
Rafael Garcia-Suarez [Fri, 8 Sep 2006 17:43:41 +0000 (19:43 +0200)]
Subject: Safe signals and SIGSEGV
Message-ID: <20060908174341.0cc7988f@grubert.mandriva.com>

p4raw-id: //depot/perl@28875

mg.c

diff --git a/mg.c b/mg.c
index 2e3bf46..b477386 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -1309,7 +1309,17 @@ Perl_csighandler(int sig)
             exit(1);
 #endif
 #endif
-   if (PL_signals & PERL_SIGNALS_UNSAFE_FLAG)
+   if (
+#ifdef SIGILL
+          sig == SIGILL ||
+#endif
+#ifdef SIGBUS
+          sig == SIGBUS ||
+#endif
+#ifdef SIGSEGV
+          sig == SIGSEGV ||
+#endif
+          (PL_signals & PERL_SIGNALS_UNSAFE_FLAG))
        /* Call the perl level handler now--
         * with risk we may be in malloc() etc. */
        (*PL_sighandlerp)(sig);