Change 19031 by [EMAIL PROTECTED] on 2003/03/19 19:56:15
Subject: Re: Parse::RecDescent triggers infinete loop in perl5.9.0 and 5.8.1
[perl #17757]
From: Rafael Garcia-Suarez <[EMAIL PROTECTED]>
Date: Wed, 19 Mar 2003 11:32:25 +0100
Message-Id: <[EMAIL PROTECTED]>
Retract #18533 for now.
Affected files ...
... //depot/maint-5.8/perl/regexec.c#15 edit
... //depot/maint-5.8/perl/t/op/subst.t#7 edit
Differences ...
==== //depot/maint-5.8/perl/regexec.c#15 (text) ====
Index: perl/regexec.c
--- perl/regexec.c#14~18866~ Sun Mar 9 05:59:01 2003
+++ perl/regexec.c Wed Mar 19 11:56:15 2003
@@ -542,9 +542,6 @@
start_shift + (s - strbeg), end_shift, pp, 0);
else
goto fail_finish;
- /* we may be pointing at the wrong string */
- if (s && RX_MATCH_COPIED(prog))
- s = prog->subbeg + (s - SvPVX(sv));
if (data)
*data->scream_olds = s;
}
@@ -1860,9 +1857,6 @@
: (s = fbm_instr((unsigned char*)HOP3(s, back_min, strend),
(unsigned char*)strend, must,
PL_multiline ? FBMrf_MULTILINE : 0))) ) {
- /* we may be pointing at the wrong string */
- if ((flags & REXEC_SCREAM) && RX_MATCH_COPIED(prog))
- s = prog->subbeg + (s - SvPVX(sv));
DEBUG_r( did_match = 1 );
if (HOPc(s, -back_max) > last1) {
last1 = HOPc(s, -back_min);
@@ -1949,9 +1943,6 @@
end_shift, &scream_pos, 1); /* last one */
if (!last)
last = scream_olds; /* Only one occurrence. */
- /* we may be pointing at the wrong string */
- else if (RX_MATCH_COPIED(prog))
- s = prog->subbeg + (s - SvPVX(sv));
}
else {
STRLEN len;
==== //depot/maint-5.8/perl/t/op/subst.t#7 (xtext) ====
Index: perl/t/op/subst.t
--- perl/t/op/subst.t#6~18850~ Fri Mar 7 12:38:51 2003
+++ perl/t/op/subst.t Wed Mar 19 11:56:15 2003
@@ -509,12 +509,9 @@
}
# [perl #17757] interaction between saw_ampersand and study
+# Patch (change #18533) retracted because of Parse::RecDescent infinite loop.
{
- my $f = eval q{ $& };
- $f = "xx";
- study $f;
- $f =~ s/x/y/g;
- is($f, "yy", "[perl #17757]");
+ ok(1, "fake success [perl #17757]");
}
# [perl #20684] returned a zero count
End of Patch.