Maybe somebody with the right regexp-fu could continue on this?
I merely tried reverting parts of patch 2372 which introduced the bug,
so I have to give up at this point.
#### Patch data follows ####
diff -c '../perl-p-5.8.0@25977/regexec.c' 'regexec.c'
Index: ./regexec.c
*** ./regexec.c Thu Nov 3 21:57:16 2005
--- ./regexec.c Fri Nov 4 07:23:03 2005
***************
*** 2177,2183 ****
prog->subbeg = PL_bostr;
prog->sublen = PL_regeol - PL_bostr; /* strend may have been modified */
}
! prog->startp[0] = startpos - PL_bostr;
PL_reginput = startpos;
PL_regstartp = prog->startp;
PL_regendp = prog->endp;
--- 2177,2183 ----
prog->subbeg = PL_bostr;
prog->sublen = PL_regeol - PL_bostr; /* strend may have been modified */
}
! /* prog->startp[0] = startpos - PL_bostr; */
PL_reginput = startpos;
PL_regstartp = prog->startp;
PL_regendp = prog->endp;
***************
*** 2221,2226 ****
--- 2221,2227 ----
#endif
REGCP_SET(lastcp);
if (regmatch(prog->program + 1)) {
+ prog->startp[0] = startpos - PL_bostr;
prog->endp[0] = PL_reginput - PL_bostr;
return 1;
}
diff -c '../perl-p-5.8.0@25977/t/op/pat.t' 't/op/pat.t'
Index: ./t/op/pat.t
*** ./t/op/pat.t Thu Nov 3 21:57:02 2005
--- ./t/op/pat.t Fri Nov 4 08:06:45 2005
***************
*** 3196,3202 ****
# bug #19049
$_="abcdef\n";
@x = m/./g;
! ok("abcde" eq "$`", '# TODO #19049 - global match not setting $`');
ok("123\x{100}" =~ /^.*1.*23\x{100}$/, 'uft8 + multiple floating substr');
--- 3196,3202 ----
# bug #19049
$_="abcdef\n";
@x = m/./g;
! ok("abcde" eq "$`", '#19049 - global match not setting $`');
ok("123\x{100}" =~ /^.*1.*23\x{100}$/, 'uft8 + multiple floating substr');
***************
*** 3390,3396 ****
$s = $1;
$s = $2;
ok($s eq 'cd',
! "# TODO assigning to original string should not corrupt match vars");
}
# last test 1187
--- 3390,3396 ----
$s = $1;
$s = $2;
ok($s eq 'cd',
! "# assigning to original string should not corrupt match vars");
}
# last test 1187
#### End of Patch data ####
--
andreas
Thanks, applied as change #25993.
Yes. I reverted it again with change #25998. If someone wants to
follow-up... It's a bit late for me to continue.