In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/17cffb3718693d45499c002f0f50df9196858f28?hp=8df6b97c1de8326d50ac9c8cae4bf716393b45bb>

- Log -----------------------------------------------------------------
commit 17cffb3718693d45499c002f0f50df9196858f28
Author: Tony Cook <t...@develop-help.com>
Date:   Tue Aug 31 00:34:19 2010 +1000

    rt77432: sigaction would crash/assert with a replaced %SIG
-----------------------------------------------------------------------

Summary of changes:
 ext/POSIX/POSIX.xs      |    2 +-
 ext/POSIX/t/sigaction.t |    9 ++++++++-
 2 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 7bdd633..2b9af95 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1471,7 +1471,7 @@ sigaction(sig, optaction, oldaction = 0)
                   right settings, including appropriate interpretation
                   of DEFAULT and IGNORE.  However, why are we doing
                   this when we're about to do it again just below?  XXX */
-               mg_set(*sigsvp);
+               SvSETMAGIC(*sigsvp);
 
                /* And here again we duplicate -- DEFAULT/IGNORE checking. */
                if(SvPOK(*svp)) {
diff --git a/ext/POSIX/t/sigaction.t b/ext/POSIX/t/sigaction.t
index bb1b715..5e2a6ad 100644
--- a/ext/POSIX/t/sigaction.t
+++ b/ext/POSIX/t/sigaction.t
@@ -11,7 +11,7 @@ BEGIN{
        }
 }
 
-use Test::More tests => 31;
+use Test::More tests => 32;
 
 use strict;
 use vars qw/$bad $bad7 $ok10 $bad18 $ok/;
@@ -204,3 +204,10 @@ SKIP: {
 eval { sigaction(-999, "foo"); };
 like($@, qr/Negative signals/,
     "Prevent negative signals instead of core dumping");
+
+# RT 77432 - assertion failure with POSIX::SigAction
+{
+  local *SIG = {};
+  ok(sigaction(SIGHUP, POSIX::SigAction->new),
+     "sigaction would crash/assert with a replaced %SIG");
+}

--
Perl5 Master Repository

Reply via email to