diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-05 17:07:00 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-05 17:07:00 +0000 |
commit | 27153ab81cea9d5ca3a79ea8e528eb90fed9fddb (patch) | |
tree | d52ee896f98d5af0be6409043856acb016df1e37 /t | |
parent | 3b421ef00fac94db72130d6dc774d9e49e8db4eb (diff) | |
download | perl-27153ab81cea9d5ca3a79ea8e528eb90fed9fddb.tar.gz |
(retracted by #13476)
Manually apply #13474; fixes stale reference to dead
CvOUTSIDE(); this can happen when anonymous subroutines
that aren't closures are returned from an eval""
(threads/shared/sv_refs.t is coredump-unhappy about this change)
p4raw-id: //depot/perl@13475
Diffstat (limited to 't')
-rw-r--r-- | t/run/kill_perl.t | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/t/run/kill_perl.t b/t/run/kill_perl.t index 6345a793a4..09e7d9c6d2 100644 --- a/t/run/kill_perl.t +++ b/t/run/kill_perl.t @@ -629,6 +629,16 @@ EOT EXPECT ok ######## +# test that closures generated by eval"" hold on to the CV of the eval"" +# for their entire lifetime +$code = eval q[ + sub { eval '$x = "ok 1\n"'; } +]; +&{$code}(); +print $x; +EXPECT +ok 1 +######## # This test is here instead of pragma/locale.t because # the bug depends on in the internal state of the locale # settings and pragma/locale messes up that state pretty badly. |