summaryrefslogtreecommitdiff
path: root/t/comp/hints.t
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2004-03-26 13:05:50 +0000
committerDave Mitchell <davem@fdisolutions.com>2004-03-26 13:05:50 +0000
commitdfa41748806263fb8b5d5fcb051bd36be96fe93c (patch)
tree489e1161a9e207248764b6552aba3327e675d317 /t/comp/hints.t
parent61967be2c930c0a1754925d7a1d1c2924a3b57ab (diff)
downloadperl-dfa41748806263fb8b5d5fcb051bd36be96fe93c.tar.gz
[perl #27040] - hints hash was being double freed on scope exit
p4raw-id: //depot/perl@22594
Diffstat (limited to 't/comp/hints.t')
-rw-r--r--t/comp/hints.t14
1 files changed, 13 insertions, 1 deletions
diff --git a/t/comp/hints.t b/t/comp/hints.t
index 117096860f..ce923cc0d7 100644
--- a/t/comp/hints.t
+++ b/t/comp/hints.t
@@ -2,7 +2,7 @@
# Tests the scoping of $^H and %^H
-BEGIN { print "1..14\n"; }
+BEGIN { print "1..15\n"; }
BEGIN {
print "not " if exists $^H{foo};
print "ok 1 - \$^H{foo} doesn't exist initially\n";
@@ -55,3 +55,15 @@ BEGIN {
print "not " if $^H & 0x00020000;
print "ok 8 - \$^H doesn't contain HINT_LOCALIZE_HH while finishing compilation\n";
}
+
+require 'test.pl';
+
+# bug #27040: hints hash was being double-freed
+my $result = runperl(
+ prog => '$^H |= 0x20000; eval q{BEGIN { $^H |= 0x20000 }}',
+ stderr => 1
+);
+print "not " if length $result;
+print "ok 15 - double-freeing hints hash\n";
+print "# got: $result\n" if length $result;
+