On Wed Aug 31 09:34:05 2011, sprout wrote: > Aha! > > In pad.c:Perl_padlist_dup: > > /* look for it in the table first. > I *think* that it shouldn't be possible to find it there. > Well, except for how Perl_sv_compile_2op() "works" :-( */ > dstpad = (AV*)ptr_table_fetch(PL_ptr_table, srcpad); > > if (dstpad) > return dstpad; > > No SvREFCNT_inc! > > commit 6de654a5795b6f7915432ff16bcdac0688492a9b > Author: Nicholas Clark <nick@ccl4.org> > Date: Thu Feb 25 14:21:18 2010 +0000 > > In Perl_padlist_dup() don't duplicate @_ or pads caused by recursion. > > CvDEPTH() is 0 in a new thread, so duplicating pads beyond the > always-present > first level is a waste of effort and memory. > > Adding SvREFCNT_inc makes one warning go away. I tried writing a small test to reproduce this, now I know the cause (of the first warning). I’ve given up. This is what didn’t work: #!perl -w use threads; $ENV = \@DB::args; my @foo = 1..100; sub { package DB; () = caller(0);}->(@foo); undef @foo; my $sc = 100; eval("sub{"x$sc . "async{}->join" . "}->()"x$sc . ';1') or die; I suppose I’ll have to fix it without tests.Thread Previous | Thread Next