Branch: refs/heads/blead Home: https://github.com/Perl/perl5 Commit: 1a21abacaf6f684928bae8baaa153733c8c238eb https://github.com/Perl/perl5/commit/1a21abacaf6f684928bae8baaa153733c8c238eb Author: Yves Orton <demer...@gmail.com> Date: 2025-02-09 (Sun, 09 Feb 2025)
Changed paths: M regexec.c M t/re/re_tests Log Message: ----------- regexec.c - Fix GH 22892 - AHO-CORASICK edge case issue In some circumstances the AHO-CORASICK logic wasn't matching properly when there were two possibilities whose proper prefix matches a proper suffix of a third possibilty, and one of those possibilities was shorter than the other. This was because we were NOT resetting the 'failed' flag properly. This bug must be rare because it took more than a decade for anyone to notice. This patch fixes the problem by resetting the failed flag after a successful transition. A good example of this problem is as follows: "ABCDE" =~ m/ABCF|BCDE|C/ This should match 'BCDE' and not 'C'. Because of the flag issue we were matching 'C' instead. This fixes https://github.com/Perl/perl5/issues/22892 To unsubscribe from these emails, change your notification settings at https://github.com/Perl/perl5/settings/notifications