summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-02-22 20:16:00 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2006-02-22 20:28:41 +0000
commit0b78c20afd064db39b35d637bceaf4533bc88c26 (patch)
tree5787b7467e934e3330efd97cdd1055803e707bba /pp_hot.c
parentb5b10606725dc42adb2909e77c05473776295195 (diff)
downloadperl-0b78c20afd064db39b35d637bceaf4533bc88c26.tar.gz
Turn on match string copying when /e flag is set on a substitution.
Subject: [PATCH] dodge a valgrind error (for maint or blead) Message-ID: <43FCB896.7060106@gmail.com> p4raw-id: //depot/perl@27270
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index e3527636e8..8d590caa63 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -1335,7 +1335,7 @@ PP(pp_match)
}
}
if ((!global && rx->nparens)
- || SvTEMP(TARG) || PL_sawampersand)
+ || SvTEMP(TARG) || PL_sawampersand || (pm->op_pmflags & PMf_EVAL))
r_flags |= REXEC_COPY_STR;
if (SvSCREAM(TARG))
r_flags |= REXEC_SCREAM;
@@ -2101,7 +2101,8 @@ PP(pp_subst)
pm = PL_curpm;
rx = PM_GETRE(pm);
}
- r_flags = (rx->nparens || SvTEMP(TARG) || PL_sawampersand)
+ r_flags = (rx->nparens || SvTEMP(TARG) || PL_sawampersand
+ || (pm->op_pmflags & PMf_EVAL))
? REXEC_COPY_STR : 0;
if (SvSCREAM(TARG))
r_flags |= REXEC_SCREAM;