From: David Mitchell Date: Wed, 17 May 2006 17:38:16 +0000 (+0100) Subject: Re: [perl #39145] win32, @_ and fork crashing in dounwind X-Git-Tag: accepted/trunk/20130322.191538~17633 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d8d97e7036087008232bf8da77755f2ab9da8b29;p=platform%2Fupstream%2Fperl.git Re: [perl #39145] win32, @_ and fork crashing in dounwind Message-ID: <20060517163816.GN17109@iabyn.com> (Dave's fix, plus a test taken from [perl #39145]) p4raw-id: //depot/perl@28215 --- diff --git a/sv.c b/sv.c index c7223c4..4c186ec 100644 --- a/sv.c +++ b/sv.c @@ -10271,6 +10271,8 @@ Perl_cx_dup(pTHX_ PERL_CONTEXT *cxs, I32 ix, I32 max, CLONE_PARAMS* param) ncx->blk_sub.hasargs = cx->blk_sub.hasargs; ncx->blk_sub.lval = cx->blk_sub.lval; ncx->blk_sub.retop = cx->blk_sub.retop; + ncx->blk_sub.oldcomppad = (PAD*)ptr_table_fetch(PL_ptr_table, + cx->blk_sub.oldcomppad); break; case CXt_EVAL: ncx->blk_eval.old_in_eval = cx->blk_eval.old_in_eval; diff --git a/t/op/fork.t b/t/op/fork.t index 588d88b..b344990 100755 --- a/t/op/fork.t +++ b/t/op/fork.t @@ -462,3 +462,9 @@ if ($pid == 0) { } EXPECT 1 +######## +# [perl #39145] Perl_dounwind() crashing with Win32's fork() emulation +sub { @_ = 3; fork ? die "1\n" : die "1\n" }->(2); +EXPECT +1 +1