diff options
author | Dave Mitchell <davem@fdisolutions.com> | 2003-10-16 20:03:44 +0000 |
---|---|---|
committer | Dave Mitchell <davem@fdisolutions.com> | 2003-10-16 20:03:44 +0000 |
commit | 4e380990fe579cbec68c15cb8ee072f2d6644a71 (patch) | |
tree | 35f69a288294af32bc65c6fdbdfa759d4279d280 /perl.c | |
parent | 4c9cc5953a3992eecff824aeaacb5b7670e2db46 (diff) | |
download | perl-4e380990fe579cbec68c15cb8ee072f2d6644a71.tar.gz |
Ensure PL_comppad/curpad point to PL_main_cv's padlist when
PL_main_root is freed; this may not have been be the case if a
thread other than the main one is the last to be destroyed
p4raw-id: //depot/perl@21470
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -354,6 +354,10 @@ perl_destruct(pTHXx) /* Destroy the main CV and syntax tree */ if (PL_main_root) { + /* ensure comppad/curpad to refer to main's pad */ + if (CvPADLIST(PL_main_cv)) { + PAD_SET_CUR_NOSAVE(CvPADLIST(PL_main_cv), 1); + } op_free(PL_main_root); PL_main_root = Nullop; } |