In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/52e67aba07fa1e33f37f56e48e0dd93a008ecede?hp=35c5736572cfe7a326c2bcdd39a98c514d54d038>
- Log ----------------------------------------------------------------- commit 52e67aba07fa1e33f37f56e48e0dd93a008ecede Author: Father Chrysostomos <[email protected]> Date: Tue Apr 10 14:52:29 2012 -0700 Add bulk 88 to AUTHORS I would not have been able to do the previous commit without his help. M AUTHORS commit 253649d90a449f693eda6b1f50f33c291d5ae594 Author: Father Chrysostomos <[email protected]> Date: Mon Apr 9 20:11:47 2012 -0700 [perl #109718] Clone PL_comppad properly fork emulation on Windows, which clones a new thread via perl_clone_using, expects to be able to access the current pad imme- diately after the cloning, and crashes if there is no current pad. PL_comppad was not being cloned explicitly, but simply looked up in the pointer table, it being assumed that it had already been cloned. For string evals, before commit 676a678, PL_compcv happened to point to the evalâs CV. PL_compcv is cloned just before PL_comppad is set, so that worked. As of commit 676a678, PL_compcv does not point to the evalâs CV at the evalâs run time, so the pad has not been cloned yet when PL_comppad is set. In the case of string evals, the CV does get cloned, but later on, after PL_comppad is set, when the stacks are cloned. Changing the setting of PL_comppad to do an actual cloning works, as, when the evalâs CV is cloned later (during stack cloning), it will simply pick up the pad that has already been cloned and is waiting for it in the pointer table. This stops eval 'fork' from crashing on Windows. M pad.h ----------------------------------------------------------------------- Summary of changes: AUTHORS | 1 + pad.h | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/AUTHORS b/AUTHORS index 09fbb5a..bd979dc 100644 --- a/AUTHORS +++ b/AUTHORS @@ -169,6 +169,7 @@ Bruce Barnett <[email protected]> Bruce J. Keeler <[email protected]> Bruce P. Schuck <[email protected]> Bud Huff <[email protected]> +bulk 88 <[email protected]> Byron Brummer <[email protected]> C Aditya <[email protected]> Calle Dybedahl <[email protected]> diff --git a/pad.h b/pad.h index ddde4d7..aa6521f 100644 --- a/pad.h +++ b/pad.h @@ -338,7 +338,7 @@ Clone the state variables associated with running and compiling pads. * sub's CV or padlist. */ #define PAD_CLONE_VARS(proto_perl, param) \ - PL_comppad = MUTABLE_AV(ptr_table_fetch(PL_ptr_table, proto_perl->Icomppad)); \ + PL_comppad = av_dup(proto_perl->Icomppad, param); \ PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL; \ PL_comppad_name = av_dup(proto_perl->Icomppad_name, param); \ PL_comppad_name_fill = proto_perl->Icomppad_name_fill; \ -- Perl5 Master Repository
