This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
(perl #134048) prevent an erroneous assertion on OP_SCALAR
authorTony Cook <tony@develop-help.com>
Wed, 24 Apr 2019 01:05:21 +0000 (11:05 +1000)
committerTony Cook <tony@develop-help.com>
Mon, 3 Jun 2019 05:10:15 +0000 (15:10 +1000)
op.c
t/op/multideref.t

diff --git a/op.c b/op.c
index 98a438d..f63eead 100644 (file)
--- a/op.c
+++ b/op.c
@@ -14904,7 +14904,8 @@ S_maybe_multideref(pTHX_ OP *start, OP *orig_o, UV orig_action, U8 hints)
 #ifdef DEBUGGING
                     OP *n = o->op_next;
                     while (n && (  n->op_type == OP_NULL
-                                || n->op_type == OP_LIST))
+                                || n->op_type == OP_LIST
+                                || n->op_type == OP_SCALAR))
                         n = n->op_next;
                     assert(n && n->op_type == OP_LEAVE);
 #endif
index 12b0453..23487ca 100644 (file)
@@ -18,7 +18,7 @@ BEGIN {
 use warnings;
 use strict;
 
-plan 64;
+plan 65;
 
 
 # check that strict refs hint is handled
@@ -242,3 +242,5 @@ sub defer {}
     ::pass("S_maybe_multideref() shouldn't leak on croak");
 }
 
+fresh_perl_is('0for%{scalar local$0[0]}', '', {},
+              "RT #134045 assertion on the OP_SCALAR");