summaryrefslogtreecommitdiff
path: root/ext/threads
diff options
context:
space:
mode:
authorDave Mitchell <davem@fdisolutions.com>2003-10-16 20:03:44 +0000
committerDave Mitchell <davem@fdisolutions.com>2003-10-16 20:03:44 +0000
commit4e380990fe579cbec68c15cb8ee072f2d6644a71 (patch)
tree35f69a288294af32bc65c6fdbdfa759d4279d280 /ext/threads
parent4c9cc5953a3992eecff824aeaacb5b7670e2db46 (diff)
downloadperl-4e380990fe579cbec68c15cb8ee072f2d6644a71.tar.gz
Ensure PL_comppad/curpad point to PL_main_cv's padlist when
PL_main_root is freed; this may not have been be the case if a thread other than the main one is the last to be destroyed p4raw-id: //depot/perl@21470
Diffstat (limited to 'ext/threads')
-rw-r--r--ext/threads/t/thread.t7
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/threads/t/thread.t b/ext/threads/t/thread.t
index c58ce00a99..2935fc2517 100644
--- a/ext/threads/t/thread.t
+++ b/ext/threads/t/thread.t
@@ -12,7 +12,7 @@ BEGIN {
use ExtUtils::testlib;
use strict;
-BEGIN { $| = 1; print "1..25\n" };
+BEGIN { $| = 1; print "1..26\n" };
use threads;
use threads::shared;
@@ -153,5 +153,10 @@ package main;
ok((keys %rand == 25), "Check that rand works after a new thread");
}
+# bugid #24165
+
+run_perl(prog =>
+ 'use threads; sub a{threads->new(shift)} $t = a sub{}; $t->tid; $t->join; $t->tid');
+is($?, 0, 'coredump in global destruction');