diff options
author | Zefram <zefram@fysh.org> | 2010-05-01 17:30:26 +0100 |
---|---|---|
committer | David Golden <dagolden@cpan.org> | 2010-05-20 18:56:11 -0400 |
commit | af5050ac60ae083ebc5a0b2a1b4289c51c622f95 (patch) | |
tree | b4d5a78625ea9b53923f18ad6a8ceb5756c09bfc /t/comp | |
parent | 4e4da3acc11d96d134ed1dc0effd641e7bedb0ca (diff) | |
download | perl-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/comp')
-rw-r--r-- | t/comp/package_block.t | 5 |
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; |