diff options
author | Zefram <zefram@fysh.org> | 2012-02-18 11:31:48 +0000 |
---|---|---|
committer | Zefram <zefram@fysh.org> | 2012-02-18 11:43:18 +0000 |
commit | 44c19e202831fce7100a4c8f20ec5a48cd0b6350 (patch) | |
tree | 95355dffc60c2e7428400f912bd118be7db26123 /sv.c | |
parent | a9bada39885b0882dfb85a8130b09deec04a6d4c (diff) | |
download | perl-44c19e202831fce7100a4c8f20ec5a48cd0b6350.tar.gz |
correctly clone eval context frames
When cloning stacks (only used for Win32 fork emulation, not for ordinary
threads), the CV referenced by an eval context frame wasn't being cloned.
This led to crashes when Win32 forked inside an eval [perl #109718].
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -12316,6 +12316,7 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) ncx->blk_eval.old_namesv = sv_dup_inc(ncx->blk_eval.old_namesv, param); ncx->blk_eval.cur_text = sv_dup(ncx->blk_eval.cur_text, param); + ncx->blk_eval.cv = cv_dup(ncx->blk_eval.cv, param); break; case CXt_LOOP_LAZYSV: ncx->blk_loop.state_u.lazysv.end @@ -12349,6 +12350,8 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) break; case CXt_BLOCK: case CXt_NULL: + case CXt_WHEN: + case CXt_GIVEN: break; } } |