From: Jarkko Hietaniemi Date: Thu, 17 Jan 2002 14:04:06 +0000 (+0000) Subject: Retract #14144 as Hugo isn't happy with it. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cdec4f4964dcec2d0a196d0906e4ec5a387041bf;p=p5sagit%2Fp5-mst-13.2.git Retract #14144 as Hugo isn't happy with it. p4raw-id: //depot/perl@14307 --- diff --git a/scope.c b/scope.c index 59adddf..3303011 100644 --- a/scope.c +++ b/scope.c @@ -693,7 +693,9 @@ Perl_leave_scope(pTHX_ I32 base) DEBUG_S(PerlIO_printf(Perl_debug_log, "restore svref: %p %p:%s -> %p:%s\n", ptr, sv, SvPEEK(sv), value, SvPEEK(value))); - if (SvTYPE(sv) == SVt_PVMG && SvMAGIC(sv)) { + if (SvTYPE(sv) >= SVt_PVMG && SvMAGIC(sv) && + SvTYPE(sv) != SVt_PVGV) + { (void)SvUPGRADE(value, SvTYPE(sv)); SvMAGIC(value) = SvMAGIC(sv); SvFLAGS(value) |= SvMAGICAL(sv); @@ -705,7 +707,9 @@ Perl_leave_scope(pTHX_ I32 base) * croaking that might ensue when the SvSETMAGIC() below is * called, or to avoid two different SVs pointing at the same * SvMAGIC()). This needs a total rethink. --GSAR */ - else if (SvTYPE(value) == SVt_PVMG && SvMAGIC(value)) { + else if (SvTYPE(value) >= SVt_PVMG && SvMAGIC(value) && + SvTYPE(value) != SVt_PVGV) + { SvFLAGS(value) |= (SvFLAGS(value) & (SVp_NOK|SVp_POK)) >> PRIVSHIFT; SvMAGICAL_off(value); diff --git a/t/run/kill_perl.t b/t/run/kill_perl.t index 3ee2831..3b46009 100644 --- a/t/run/kill_perl.t +++ b/t/run/kill_perl.t @@ -756,18 +756,6 @@ ok print join '', @a, "\n"; EXPECT 123456789 -######## [ID 20010912.007] segfault or "Can't modify non-existent substring" -$b="abcde"; -$s = \substr($b, 2, 1); -print "before: $$s\n"; -{ - local $k; - *k = $s; -} -print "after: $$s\n"; -EXPECT -before: c -after: c ######## [ID 20020104.007] "coredump on dbmclose" package Foo; eval { dbmclose %h }; # not all places have dbm* functions