5 require './test.pl'; # for which_perl() etc
12 if (!$Config{useithreads}) {
13 print "1..0 # Skip: no ithreads\n";
16 if ($ENV{PERL_CORE_MINITEST}) {
17 print "1..0 # Skip: no dynamic loading on miniperl, no threads\n";
24 # test that we don't get:
25 # Attempt to free unreferenced scalar: SV 0x40173f3c
26 fresh_perl_is(<<'EOI', 'ok', { }, 'delete() under threads');
28 threads->new(sub { my %h=(1,2); delete $h{1}})->join for 1..2;
33 # test that we don't get:
34 # Attempt to free unreferenced scalar: SV 0x814e0dc.
35 fresh_perl_is(<<'EOI', 'ok', { }, 'weaken ref under threads');
41 Scalar::Util::weaken($copy);
42 threads->new(sub { 1 })->join for (1..1);
47 # test that we don't get:
48 # panic: magic_killbackrefs.
50 fresh_perl_is(<<'EOI', 'ok', { }, 'weaken ref #2 under threads');
52 sub new { bless {},shift }
55 use Scalar::Util qw(weaken);
56 my $object = Foo->new;
59 threads->new(sub { $ref = $object } )->join; # $ref = $object causes problems