Skip to content

Commit

Permalink
(perl #134048) prevent an erroneous assertion on OP_SCALAR
Browse files Browse the repository at this point in the history
  • Loading branch information
tonycoz committed Jun 3, 2019
1 parent ddf1088 commit 94a2f6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion op.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 3 additions & 1 deletion t/op/multideref.t
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BEGIN {
use warnings;
use strict;

plan 64;
plan 65;


# check that strict refs hint is handled
Expand Down Expand Up @@ -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");

0 comments on commit 94a2f6a

Please sign in to comment.