In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/2b6a5bfb1d5528005ca38fa7b8db46b49ae84e80?hp=51068c1406a3db6f7be27d5041ff91444bac8886>
- Log ----------------------------------------------------------------- commit 2b6a5bfb1d5528005ca38fa7b8db46b49ae84e80 Author: Father Chrysostomos <spr...@cpan.org> Date: Sun Aug 28 07:21:19 2016 -0700 [perl #125679] Donât make lvref ops on error When converting an op into an lvref op (the rv2av in \(@_)=... gets converted while the refgen gets nulled), if we reject the op as a valid one for refaliasing we should not go ahead and convert it. It we do convert it (as we were doing), then we may convert an op that uses op_targ for auxiliary information into one that uses it as a pad offset. When freeing the op, we will then be reading a ârandomâ off- set in the pad and trying to free the SV. That pad entry may not even be within the pad. In the specific case of entereval, op_targ holds the hints, and the larger the value of $^H, the more likely it is to crash. So BEGIN{$^H=-1}\eval=... will crash. ----------------------------------------------------------------------- Summary of changes: op.c | 1 + t/comp/parser.t | 3 +++ 2 files changed, 4 insertions(+) diff --git a/op.c b/op.c index 693828f..cedc5e8 100644 --- a/op.c +++ b/op.c @@ -2839,6 +2839,7 @@ S_lvref(pTHX_ OP *o, I32 type) ? "do block" : OP_DESC(o), PL_op_desc[type])); + return; } OpTYPE_set(o, OP_LVREF); o->op_private &= diff --git a/t/comp/parser.t b/t/comp/parser.t index 5ca07ea..981f265 100644 --- a/t/comp/parser.t +++ b/t/comp/parser.t @@ -540,6 +540,9 @@ eval "grep+grep"; eval 'my $_; m// ~~ 0'; } +# Used to crash [perl #125679] +eval 'BEGIN {$^H=-1} \eval=time'; + # RT #124207 syntax error during stringify can leave stringify op # with multiple children and assertion failures -- Perl5 Master Repository