From: Josh ben Jore Date: Mon, 20 Jul 2009 14:39:25 +0000 (-0700) Subject: Test that `use feature' doesn't leak a scalar during s///ee X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cda5e2ec34321ed347095f583f979be84943ec52;p=p5sagit%2Fp5-mst-13.2.git Test that `use feature' doesn't leak a scalar during s///ee --- diff --git a/MANIFEST b/MANIFEST index 9b2e198..6192dd0 100644 --- a/MANIFEST +++ b/MANIFEST @@ -4027,6 +4027,7 @@ t/lib/dprof/test8_v Perl code profiler tests t/lib/dprof/V.pm Perl code profiler tests t/lib/feature/bundle Tests for feature bundles t/lib/feature/implicit Tests for implicit loading of feature.pm +t/lib/feature/leak Tests for memory leaks t/lib/feature/nonesuch Tests for enabling/disabling nonexistent feature t/lib/feature/say Tests for enabling/disabling say feature t/lib/feature/switch Tests for enabling/disabling switch feature diff --git a/t/lib/feature/leak b/t/lib/feature/leak new file mode 100644 index 0000000..fbd35f0 --- /dev/null +++ b/t/lib/feature/leak @@ -0,0 +1,12 @@ +Check that 'use feature' does not leak + +__END__ +# RT 63110 - Check that s///ee does not leak a hints variable +use feature qw(:5.10); +my $t; +my $s = "a"; +$s =~ s/a/$t = \%^H; qq( qq() );/ee; +print Internals::SvREFCNT(%$t); + +EXPECT +1