In perl.git, the branch blead has been updated <https://perl5.git.perl.org/perl.git/commitdiff/d81b77352f66acde60db1b056b8eb3321b7b55fe?hp=ca8b93afd02ddde55c1aa9e6fbff9acdad31593d>
- Log ----------------------------------------------------------------- commit d81b77352f66acde60db1b056b8eb3321b7b55fe Author: Tony Cook <[email protected]> Date: Wed Feb 6 10:37:58 2019 +1100 (perl #133778) adjust MARK if we extend the stack in pp_repeat for a list repeat in scalar/void context ----------------------------------------------------------------------- Summary of changes: pp.c | 3 ++- t/op/repeat.t | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/pp.c b/pp.c index 5965f1adc0..77dddcb8b3 100644 --- a/pp.c +++ b/pp.c @@ -1694,7 +1694,8 @@ PP(pp_repeat) else { dTOPss; ASSUME(MARK + 1 == SP); - XPUSHs(sv); + MEXTEND(SP, 1); + PUSHs(sv); MARK[1] = &PL_sv_undef; } SP = MARK + 2; diff --git a/t/op/repeat.t b/t/op/repeat.t index 978916689b..fa7ce06904 100644 --- a/t/op/repeat.t +++ b/t/op/repeat.t @@ -6,7 +6,7 @@ BEGIN { set_up_inc( '../lib' ); } -plan(tests => 49); +plan(tests => 50); # compile time @@ -192,3 +192,85 @@ fresh_perl_like( eval q{() = (() or ((0) x 0)); 1}; is($@, "", "RT #130247"); + +# yes, the newlines matter +fresh_perl_is(<<'PERL', "", { stderr => 1 }, "(perl #133778) MARK mishandling"); +map{s[][];eval;0}<DATA>__END__ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +()x0 + + + + + + + + + + + + + + + + + + + + + + + + + + +0 +PERL -- Perl5 Master Repository
