From: Ilya Zakharevich Date: Thu, 27 Feb 1997 19:24:36 +0000 (-0500) Subject: Fix SEGV when debugging with foreach() lvalue patch X-Git-Tag: accepted/trunk/20130322.191538~38041^2~330 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d368068e81e6a41051cb58eaf3303203a657c852;p=platform%2Fupstream%2Fperl.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);