summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-12-05 17:07:00 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-05 17:07:00 +0000
commit27153ab81cea9d5ca3a79ea8e528eb90fed9fddb (patch)
treed52ee896f98d5af0be6409043856acb016df1e37 /t
parent3b421ef00fac94db72130d6dc774d9e49e8db4eb (diff)
downloadperl-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.t10
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.