In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/ac51e94be5daabecdeb0ed734f3ccc059b7b77e3?hp=557d584c578ba8b01a3c9eb7a3b88b7abb1855bb>
- Log ----------------------------------------------------------------- commit ac51e94be5daabecdeb0ed734f3ccc059b7b77e3 Author: Karl Williamson <[email protected]> Date: Wed Mar 9 21:28:35 2011 -0700 regexec.c: don't try accessing non-bitmap if doesn't exist ANYOF_NONBITMAP is supposed to be set iff there is something outside the bitmap to try matching in an ANYOF node. Due to slight changes in the meaning of this, the code has been trying to access this if ANYOF_NONBITMAP_NON_UTF8 is set without ANYOF_NONBITMAP being set, which means it was trying to access something that doesn't exist. I'm hopeful, based on a stack trace sent to me that this is the cause of [perl #85478], but can't reproduce that easily. But the logic is clearly wrong. ----------------------------------------------------------------------- Summary of changes: regexec.c | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) diff --git a/regexec.c b/regexec.c index 76784ee..56b906c 100644 --- a/regexec.c +++ b/regexec.c @@ -6597,11 +6597,12 @@ S_reginclass(pTHX_ const regexp * const prog, register const regnode * const n, if (utf8_target && (flags & ANYOF_UNICODE_ALL) && c >= 256) { match = TRUE; /* Everything above 255 matches */ } - else if ((flags & ANYOF_NONBITMAP_NON_UTF8 - || (utf8_target && ANYOF_NONBITMAP(n) - && (c >=256 - || (! (flags & ANYOF_LOCALE)) - || (flags & ANYOF_IS_SYNTHETIC))))) + else if (ANYOF_NONBITMAP(n) + && (flags & ANYOF_NONBITMAP_NON_UTF8) + || (utf8_target + && (c >=256 + || (! (flags & ANYOF_LOCALE)) + || (flags & ANYOF_IS_SYNTHETIC)))) { AV *av; SV * const sw = regclass_swash(prog, n, TRUE, 0, (SV**)&av); -- Perl5 Master Repository
