From: Ilya Zakharevich Date: Thu, 27 Feb 1997 19:24:36 +0000 (-0500) Subject: Fix SEGV when debugging with foreach() lvalue patch X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d368068e81e6a41051cb58eaf3303203a657c852;p=p5sagit%2Fp5-mst-13.2.git Fix SEGV when debugging with foreach() lvalue patch p5p-msgid: <199702271924.OAA14557@monk.mps.ohio-state.edu> --- diff --git a/sv.c b/sv.c index 65d7d30..8f6bbe9 100644 --- a/sv.c +++ b/sv.c @@ -2624,6 +2624,9 @@ register SV *sv; sv_upgrade(&ref, SVt_RV); SvRV(&ref) = SvREFCNT_inc(sv); SvROK_on(&ref); + SvREFCNT(&ref) = 1; /* Fake, but otherwise + creating+destructing a ref + leads to disaster. */ EXTEND(SP, 2); PUSHMARK(SP);