From: Kevin Chase Date: Mon, 20 May 2002 17:02:16 +0000 (-0700) Subject: Win32 crash in fork.t (perl@16694) X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d10edb75101a70b3aec5c96790f9074bbeebfb16;p=p5sagit%2Fp5-mst-13.2.git Win32 crash in fork.t (perl@16694) From: "Kevin Chase" Message-ID: It looks that the Poison() found its first target. The suggested patch is fine. p4raw-id: //depot/perl@16724 --- diff --git a/cop.h b/cop.h index bee1b6a..81733e9 100644 --- a/cop.h +++ b/cop.h @@ -241,12 +241,16 @@ struct block_loop { # define CX_ITERDATA_SET(cx,idata) \ cx->blk_loop.oldcurpad = PL_curpad; \ if ((cx->blk_loop.iterdata = (idata))) \ - cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); + cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); \ + else \ + cx->blk_loop.itersave = Nullsv; #else # define CxITERVAR(c) ((c)->blk_loop.itervar) # define CX_ITERDATA_SET(cx,ivar) \ if ((cx->blk_loop.itervar = (SV**)(ivar))) \ - cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); + cx->blk_loop.itersave = SvREFCNT_inc(*CxITERVAR(cx)); \ + else \ + cx->blk_loop.itersave = Nullsv; #endif #define PUSHLOOP(cx, dat, s) \