Commit | Line | Data |
---|---|---|
3c1b273b NC |
1 | # [perl #118139] crash in global destruction when accessing the freed cxt. |
2 | use Test::More tests => 1; | |
f17010da RU |
3 | use Storable; |
4 | BEGIN { | |
f17010da RU |
5 | store {}, "foo"; |
6 | } | |
7 | package foo; | |
8 | sub new { return bless {} } | |
9 | DESTROY { | |
3c1b273b NC |
10 | open FH, "<foo" or die $!; |
11 | eval { Storable::pretrieve(*FH); }; | |
12 | close FH or die $!; | |
f17010da RU |
13 | unlink "foo"; |
14 | } | |
15 | ||
16 | package main; | |
17 | # print "# $^X\n"; | |
18 | $x = foo->new(); | |
19 | ||
20 | ok(1); |