diff options
author | Josh ben Jore <jjore@cpan.org> | 2009-07-20 07:39:25 -0700 |
---|---|---|
committer | Josh ben Jore <jjore@cpan.org> | 2009-07-20 07:39:25 -0700 |
commit | cda5e2ec34321ed347095f583f979be84943ec52 (patch) | |
tree | e20e9cb09fefc6b8d710f88fe4a3be959d6cc94b | |
parent | addebd58fe5038ba5ab1d195d5a70642316fdbfc (diff) | |
download | perl-cda5e2ec34321ed347095f583f979be84943ec52.tar.gz |
Test that `use feature' doesn't leak a scalar during s///ee
-rw-r--r-- | MANIFEST | 1 | ||||
-rw-r--r-- | t/lib/feature/leak | 12 |
2 files changed, 13 insertions, 0 deletions
@@ -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 |