This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
When deleting CLONE_PARAMS, push any unreferenced SVs onto the temps stack.
authorNicholas Clark <nick@ccl4.org>
Thu, 25 Feb 2010 11:12:03 +0000 (11:12 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 24 May 2010 14:50:57 +0000 (15:50 +0100)
commite42956688f2e0df936f1a42811962946e4e185bf
tree4686d0988e09cd38798fcc4f2a3cc3eacd06600d
parentd08d57ef17162c52e2024a3ba6755f778acbc697
When deleting CLONE_PARAMS, push any unreferenced SVs onto the temps stack.

Effectively this leaves the cloned-into interpreter in a consistent state.
In the cloned-from interpreter, the SV targets of non-reference owning pointers
*are* referenced and managed by other pointers. SvREFCNT() == 0 SVs in the
cloned-into interpreter result from the non-reference owning pointers being
found and followed, but the reference owning and managing pointers not being
part of the subsection of interpreter state cloned over. Hence, this change
creates reference owning pointers to this SVs on the temps stack, which ensures
that they are correctly cleaned up, and don't "leak" until interpreter
destruction. (Which might be some time away, in a persistent process.)
embed.fnc
embed.h
proto.h
sv.c
t/op/threads.t