diff options
author | Ilya Zakharevich <ilya@math.berkeley.edu> | 1999-11-01 13:14:16 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1999-11-01 23:05:07 +0000 |
commit | 3cf5c1959ebd22791f34a1706083a3ce9aa50a39 (patch) | |
tree | 538d117b94464e1c20b9a96fa0161ffca6ae896f /regexec.c | |
parent | 14bdf8d3bfc4c68a9e0d4420c4db2eccd669ea5d (diff) | |
download | perl-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.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -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) |