In perl.git, the branch maint-5.22 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/837683e59fa525306bad8373b6d13d3f67cab752?hp=d8e97bce64a7bca740ab6e7b40765463a40f1894>

- Log -----------------------------------------------------------------
commit 837683e59fa525306bad8373b6d13d3f67cab752
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Oct 16 20:57:55 2015 -0400

    rt.perl.org perl #88814 was revived in openbsd by commit 23705063.
    
    openbsd pre-5.2 + threads + signals is broken,
    and 23705063 made threads the default.
    
    Similar case to 8e7f1f72.
    
    (cherry picked from commit 9f7ba77d76fb7406010117db6bfe6b5f86b376b6)

M       t/op/sigdispatch.t

commit 62339204d49eb4a064d0d7574fd5abcf415bcb57
Author: Jarkko Hietaniemi <[email protected]>
Date:   Fri Oct 16 19:52:30 2015 -0400

    perl #126306: openbsd t/io/errno.t tests fail randomly
    
    perl #71504 added the skip for openbsd+threads+stdio;
    then commit 23705063 made -lpthread the default,
    necessitating the skip even without threads.
    
    (cherry picked from commit 8e7f1f724eb9360bef95eb47b50c93350a9fe142)

M       t/io/errno.t

commit 71ab37fe29b3bf42750fe9a1c40387129f0361ab
Author: Jarkko Hietaniemi <[email protected]>
Date:   Tue Oct 13 08:55:08 2015 -0400

    IRIX <sys/prctl.h> is not what Configure expects.
    
    It exists, but the API is something completely different,
    so the compilation attempt ends up in a fireworks display.
    
    (cherry picked from commit a7dba6f870a82e3be87bda50593cb5d2042277fd)

M       hints/irix_6.sh

commit da3073b169e040fb7a827a49c40aa4e7a4590a67
Author: Karl Williamson <[email protected]>
Date:   Mon Oct 12 16:38:32 2015 -0600

    PATCH: [perl #126180] /(?[\ &!])/ segfaults
    
    (cherry picked from commit 5a55ed33047e05399ce1a3781bb35f300aa7fb63)

M       pod/perldelta.pod
M       regcomp.c
M       t/re/reg_mesg.t
-----------------------------------------------------------------------

Summary of changes:
 hints/irix_6.sh    |  3 +++
 pod/perldelta.pod  |  7 +++++++
 regcomp.c          | 11 +++++++++--
 t/io/errno.t       |  6 ++++--
 t/op/sigdispatch.t |  5 +++--
 t/re/reg_mesg.t    |  1 +
 6 files changed, 27 insertions(+), 6 deletions(-)

diff --git a/hints/irix_6.sh b/hints/irix_6.sh
index fc315a5..832fde2 100644
--- a/hints/irix_6.sh
+++ b/hints/irix_6.sh
@@ -683,3 +683,6 @@ usemymalloc=${usemymalloc:-false}
 # instead; in IRIX this is not true because the prototype of fcntl()
 # requires explicit include of <fcntl.h>
 i_fcntl=define
+
+# There is <prctl.h> but it's not the Linux one that Configure expects.
+d_prctl="$undef"
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 8b3f570..b0b108d 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -355,6 +355,13 @@ work if I<min> and I<max> were equal.  [perl #125825]
 C<< BEGIN <> >> no longer segfaults and properly produces an error
 message.  [perl #125341]
 
+=item *
+
+A regression from perl v5.20 has been fixed, in which some syntax errors
+in L<C<(?[...])>|perlrecharclass/Extended Bracketed Character Classes>
+constructs within regular expression patterns could cause a segfault
+instead of a proper error message.  [perl #126180]
+
 =back
 
 =head1 Known Problems
diff --git a/regcomp.c b/regcomp.c
index 40ef404..fbcecc4 100644
--- a/regcomp.c
+++ b/regcomp.c
@@ -13791,10 +13791,16 @@ redo_curchar:
                 /* Here, the new operator has equal or lower precedence than
                  * what's already there.  This means the operation already
                  * there should be performed now, before the new one. */
+
                 rhs = av_pop(stack);
-                lhs = av_pop(stack);
+                if (! IS_OPERAND(rhs)) {
 
-                assert(IS_OPERAND(rhs));
+                    /* This can happen when a ! is not followed by an operand,
+                     * like in /(?[\t &!])/ */
+                    goto bad_syntax;
+                }
+
+                lhs = av_pop(stack);
                 assert(IS_OPERAND(lhs));
 
                 switch (stacked_operator) {
@@ -13918,6 +13924,7 @@ redo_curchar:
         || SvTYPE(final) != SVt_INVLIST
         || av_tindex(stack) >= 0)  /* More left on stack */
     {
+      bad_syntax:
         SvREFCNT_dec(final);
         vFAIL("Incomplete expression within '(?[ ])'");
     }
diff --git a/t/io/errno.t b/t/io/errno.t
index 8d0f4b2..d8fc4b2 100644
--- a/t/io/errno.t
+++ b/t/io/errno.t
@@ -28,8 +28,10 @@ for my $perlio ('perlio', 'stdio') {
 SKIP:
     for my $test_in ("test\n", "test") {
                skip("Guaranteed newline at EOF on VMS", 4) if $^O eq 'VMS' && 
$test_in eq 'test';
-                skip("[perl #71504] OpenBSD test failures in errno.t with 
ithreads and perlio", 8)
-                    if $^O eq 'openbsd' && $Config{useithreads} && $perlio eq 
'stdio';
+                # perl #71504 added skip in openbsd+threads+stdio;
+                # then commit 23705063 made -lpthread the default.
+                skip("[perl #71504] OpenBSD test failures in errno.t with 
ithreads and perlio]; [perl #126306: openbsd t/io/errno.t tests fail 
randomly]", 8)
+                    if $^O eq 'openbsd' && $perlio eq 'stdio';
                my $test_in_esc = $test_in;
                $test_in_esc =~ s/\n/\\n/g;
                for my $rs_code ('', '$/=undef', '$/=\2', '$/=\1024') {
diff --git a/t/op/sigdispatch.t b/t/op/sigdispatch.t
index 9808f7b..242fb8e 100644
--- a/t/op/sigdispatch.t
+++ b/t/op/sigdispatch.t
@@ -44,8 +44,9 @@ SKIP: {
     skip('We can\'t test blocking without sigprocmask', 17)
        if is_miniperl() || !$Config{d_sigprocmask};
     skip("This doesn\'t work on $^O threaded builds RT#88814", 17)
-        if ($^O =~ /cygwin/ || $^O eq "openbsd" && $Config{osvers} < 5.2)
-           && $Config{useithreads};
+        if ($^O =~ /cygwin/ && $Config{useithreads});
+    skip("This doesn\'t work on $^O version $Config{osvers} RT#88814", 17)
+        if ($^O eq "openbsd" && $Config{osvers} < 5.2);
 
     require POSIX;
     my $pending = POSIX::SigSet->new();
diff --git a/t/re/reg_mesg.t b/t/re/reg_mesg.t
index 9b445ca..bf81cd3 100644
--- a/t/re/reg_mesg.t
+++ b/t/re/reg_mesg.t
@@ -259,6 +259,7 @@ my @death =
  'm/\cß/' => "Character following \"\\c\" must be printable ASCII",
  '/((?# This is a comment in the middle of a token)?:foo)/' => 'In \'(?...)\', 
the \'(\' and \'?\' must be adjacent {#} m/((?# This is a comment in the middle 
of a token)?{#}:foo)/',
  '/((?# This is a comment in the middle of a token)*FAIL)/' => 'In 
\'(*VERB...)\', the \'(\' and \'*\' must be adjacent {#} m/((?# This is a 
comment in the middle of a token)*{#}FAIL)/',
+ '/(?[\ &!])/' => 'Incomplete expression within \'(?[ ])\' {#} m/(?[\ 
&!{#}])/',    # [perl #126180]
 );
 
 # These are messages that are warnings when not strict; death under 'use re

--
Perl5 Master Repository

Reply via email to