diff options
author | Tony Cook <tony@develop-help.com> | 2019-04-24 11:05:21 +1000 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2019-10-27 09:44:58 +0000 |
commit | f5d743666a204c0de45656fde5e486393b1a5011 (patch) | |
tree | d6465389c55cddca0680a125cbd4c378d8739a56 | |
parent | a3ffabdfd0a8511ef6e064e9793d12d06f705ff8 (diff) | |
download | perl-f5d743666a204c0de45656fde5e486393b1a5011.tar.gz |
(perl #134048) prevent an erroneous assertion on OP_SCALAR
(cherry picked from commit 94a2f6a3c87a0795b9b1aabd49616f90c922b835)
-rw-r--r-- | op.c | 3 | ||||
-rw-r--r-- | t/op/multideref.t | 4 |
2 files changed, 5 insertions, 2 deletions
@@ -14908,7 +14908,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 diff --git a/t/op/multideref.t b/t/op/multideref.t index 12b04536e5..23487ca283 100644 --- a/t/op/multideref.t +++ b/t/op/multideref.t @@ -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"); |