summaryrefslogtreecommitdiff
path: root/regexec.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-11-01 13:14:16 -0500
committerJarkko Hietaniemi <jhi@iki.fi>1999-11-01 23:05:07 +0000
commit3cf5c1959ebd22791f34a1706083a3ce9aa50a39 (patch)
tree538d117b94464e1c20b9a96fa0161ffca6ae896f /regexec.c
parent14bdf8d3bfc4c68a9e0d4420c4db2eccd669ea5d (diff)
downloadperl-3cf5c1959ebd22791f34a1706083a3ce9aa50a39.tar.gz
Re: [ID 19991026.001] perl segmentation fault report
To: lvirden@cas.org (Larry W. Virden) Cc: perl5-porters@perl.org, lvirden@cas.org Message-Id: <199911012314.SAA22664@monk.mps.ohio-state.edu> p4raw-id: //depot/cfgperl@4507
Diffstat (limited to 'regexec.c')
-rw-r--r--regexec.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/regexec.c b/regexec.c
index 684e344c16..da06e7f52a 100644
--- a/regexec.c
+++ b/regexec.c
@@ -643,6 +643,9 @@ Perl_re_intuit_start(pTHX_ regexp *prog, SV *sv, char *strpos,
prog->check_substr = Nullsv; /* disable */
prog->float_substr = Nullsv; /* clear */
s = strpos;
+ /* XXXX This is a remnant of the old implementation. It
+ looks wasteful, since now INTUIT can use many
+ other heuristics too. */
prog->reganch &= ~RE_USE_INTUIT;
}
else
@@ -805,9 +808,13 @@ Perl_regexec_flags(pTHX_ register regexp *prog, char *stringarg, register char *
after_try:
if (s >= end)
goto phooey;
- s = re_intuit_start(prog, sv, s + 1, strend, flags, NULL);
- if (!s)
- goto phooey;
+ if (prog->reganch & RE_USE_INTUIT) {
+ s = re_intuit_start(prog, sv, s + 1, strend, flags, NULL);
+ if (!s)
+ goto phooey;
+ }
+ else
+ s++;
}
} else {
if (s > startpos)