summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-01-17 14:04:06 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-01-17 14:04:06 +0000
commitcdec4f4964dcec2d0a196d0906e4ec5a387041bf (patch)
treedf714a64abfb86788d1f2cdaab59959fffe21e64
parent18880e27741f3630c8397e7af71f1f442ce62022 (diff)
downloadperl-cdec4f4964dcec2d0a196d0906e4ec5a387041bf.tar.gz
Retract #14144 as Hugo isn't happy with it.
p4raw-id: //depot/perl@14307
-rw-r--r--scope.c8
-rw-r--r--t/run/kill_perl.t12
2 files changed, 6 insertions, 14 deletions
diff --git a/scope.c b/scope.c
index 59adddf66f..3303011393 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 3ee283149a..3b46009a5b 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