This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deliver SIGILL, SIGBUS and SIGSEGV always in an "unsafe" manner.
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Fri, 8 Sep 2006 17:43:41 +0000 (19:43 +0200)
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>
Wed, 20 Sep 2006 16:12:14 +0000 (16:12 +0000)
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
             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);
        /* Call the perl level handler now--
         * with risk we may be in malloc() etc. */
        (*PL_sighandlerp)(sig);