From: Rafael Garcia-Suarez Date: Sun, 31 May 2009 13:09:56 +0000 (+0200) Subject: Add regression test for [RT#63110] X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fa13de9435b2f7be1099b9202ae6e26021b00ba8;p=p5sagit%2Fp5-mst-13.2.git Add regression test for [RT#63110] This is based on a stand-alone test by Bram --- diff --git a/t/op/eval.t b/t/op/eval.t index 23725d5..4c01434 100755 --- a/t/op/eval.t +++ b/t/op/eval.t @@ -6,7 +6,7 @@ BEGIN { require './test.pl'; } -print "1..98\n"; +print "1..99\n"; eval 'print "ok 1\n";'; @@ -539,10 +539,20 @@ END_EVAL_TEST my $ok = runperl(progfile => $tempfile); print "not " unless $ok; print "ok $test # eval { 1 } completly resets \$@\n"; - - $test++; } else { print "ok $test # skipped - eval { 1 } completly resets \$@"; } +$test++; +# Test that "use feature" and other hint transmission in evals and s///ee +# don't leak memory +{ + use feature qw(:5.10); + my $t; + my $s = "a"; + $s =~ s/a/$t = \%^H; qq( qq() );/ee; + print "not " if Internals::SvREFCNT(%$t) != 1; + print "ok $test - RT 63110\n"; + $test++; +}