summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2013-06-05 21:40:24 -0700
committerFather Chrysostomos <sprout@cpan.org>2013-06-05 21:40:24 -0700
commit1e4f088863436a8019c7d864691903ffdafeefda (patch)
tree3148b3a86e6bb3d966f709f93e946b3d07b0616a /t
parentdc6876f2369ec6d815f194eaa9fa09a85b3e7531 (diff)
downloadperl-1e4f088863436a8019c7d864691903ffdafeefda.tar.gz
Don’t leak the /(?[])/ parsing stack on error
Instead of creating the parsing stack and then freeing it after pars- ing the (?[...]) construct (leaking it whenever one of the various errors scattered throughout the parsing code occurs), mortalise it to begin with and let the mortals stack take care of it.
Diffstat (limited to 't')
-rw-r--r--t/op/svleak.t3
1 files changed, 2 insertions, 1 deletions
diff --git a/t/op/svleak.t b/t/op/svleak.t
index 642b81d018..8140ded505 100644
--- a/t/op/svleak.t
+++ b/t/op/svleak.t
@@ -15,7 +15,7 @@ BEGIN {
use Config;
-plan tests => 114;
+plan tests => 115;
# run some code N times. If the number of SVs at the end of loop N is
# greater than (N-1)*delta at the end of loop 1, we've got a leak
@@ -240,6 +240,7 @@ eleak(2,0,'/[pp]/');
eleak(2,0,'/[[:ascii:]]/');
eleak(2,0,'/[[.zog.]]/');
eleak(2,0,'/[.zog.]/');
+eleak(2,0,'no warnings; /(?[])/');
# These can generate one ref count, but just once.
eleak(4,1,'chr(0x100) =~ /[[:punct:]]/');