summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh ben Jore <jjore@cpan.org>2009-07-20 07:39:25 -0700
committerJosh ben Jore <jjore@cpan.org>2009-07-20 07:39:25 -0700
commitcda5e2ec34321ed347095f583f979be84943ec52 (patch)
treee20e9cb09fefc6b8d710f88fe4a3be959d6cc94b
parentaddebd58fe5038ba5ab1d195d5a70642316fdbfc (diff)
downloadperl-cda5e2ec34321ed347095f583f979be84943ec52.tar.gz
Test that `use feature' doesn't leak a scalar during s///ee
-rw-r--r--MANIFEST1
-rw-r--r--t/lib/feature/leak12
2 files changed, 13 insertions, 0 deletions
diff --git a/MANIFEST b/MANIFEST
index 9b2e1986e7..6192dd04fc 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 0000000000..fbd35f0754
--- /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