This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix CLONE/weakref bug revealed by adf8f095c5881bce.
authorNicholas Clark <nick@ccl4.org>
Tue, 25 May 2010 16:23:10 +0000 (17:23 +0100)
committerNicholas Clark <nick@ccl4.org>
Tue, 25 May 2010 16:40:29 +0000 (17:40 +0100)
commit04518cc3f43b495f85caf2ec89c8b06540a60f8c
treed0d0725b9a759d66a751caf10827580272f07d01
parenta77cd7b8173d6381e0eb4d3296627023900d0cb4
Fix CLONE/weakref bug revealed by adf8f095c5881bce.

The AV unreferenced in the clone_params needs to be reference counted, rather
than not referenced counted, because the fixup to ensure that all otherwise
0-reference count scalars have a reference (on the temps stack) happens after
CLONE is run, and CLONE can run Perl code that causes their reference counts
to increase from then return to zero, which prematurely triggers sv_free().
sv.c
t/op/threads.t