diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-18 03:22:24 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-08-18 03:22:24 +0000 |
commit | af903f693e49116b2e364fd529103fa436976640 (patch) | |
tree | 7c61d7e588b2bc7f46203143701fdaa2dd701fd4 /pp_hot.c | |
parent | 0a66a22ff50145064e05e80dfd0a1368645cf197 (diff) | |
download | perl-af903f693e49116b2e364fd529103fa436976640.tar.gz |
(Retracted by #11714)
Okay analysis, debatable fix. (The fix will inc
the refcount of all temporary match objects,
like for example tied(%h) =~ /^.../ from Tie/RefHash.t,
which will then cause griping at untie() time
("inner references remain").
Fix for ID 20010407.006: PL_reg_sv got wiped out
by freetemps if the match target was a temporary
(like function_call() =~ /.../), which in turn meant
that the $1 et al stopped working if they had UTF-8
in them. Therefore bump up the refcount of PL_reg_sv.
p4raw-id: //depot/perl@11712
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1222,7 +1222,7 @@ PP(pp_match) TARG = DEFSV; EXTEND(SP,1); } - PL_reg_sv = TARG; + PL_reg_sv = SvREFCNT_inc(TARG); PUTBACK; /* EVAL blocks need stack_sp. */ s = SvPV(TARG, len); strend = s + len; @@ -1909,7 +1909,7 @@ PP(pp_subst) TARG = DEFSV; EXTEND(SP,1); } - PL_reg_sv = TARG; + PL_reg_sv = SvREFCNT_inc(TARG); do_utf8 = DO_UTF8(PL_reg_sv); if (SvFAKE(TARG) && SvREADONLY(TARG)) sv_force_normal(TARG); |