summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2010-05-01 17:30:26 +0100
committerDavid Golden <dagolden@cpan.org>2010-05-20 18:56:11 -0400
commitaf5050ac60ae083ebc5a0b2a1b4289c51c622f95 (patch)
treeb4d5a78625ea9b53923f18ad6a8ceb5756c09bfc /t
parent4e4da3acc11d96d134ed1dc0effd641e7bedb0ca (diff)
downloadperl-af5050ac60ae083ebc5a0b2a1b4289c51c622f95.tar.gz
fix SEGV with eval("package Foo {")
OPs relating to the package name and version were subject to double freeing during error recovery from an incomplete package block. Fixed by using the op_latefree mechanism to shift the op free time.
Diffstat (limited to 't')
-rw-r--r--t/comp/package_block.t5
1 files changed, 4 insertions, 1 deletions
diff --git a/t/comp/package_block.t b/t/comp/package_block.t
index 8645f1a175..31aa3b8ae0 100644
--- a/t/comp/package_block.t
+++ b/t/comp/package_block.t
@@ -1,6 +1,6 @@
#!./perl
-print "1..3\n";
+print "1..4\n";
$main::result = "";
eval q{
@@ -34,4 +34,7 @@ eval q{
};
print $main::result eq "a(main)b(main)" ? "ok 3\n" : "not ok 3\n";
+eval q[package Foo {];
+print $@ =~ /\AMissing right curly / ? "ok 4\n" : "not ok 4\n";
+
1;