Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: b27da4016d599e83fbfc511ff49b1004c46e1f0a
      
https://github.com/Perl/perl5/commit/b27da4016d599e83fbfc511ff49b1004c46e1f0a
  Author: Richard Leach <[email protected]>
  Date:   2026-10-11 (Sun, 11 Oct 2026)

  Changed paths:
    M pod/perldelta.pod
    M regexec.c
    M t/re/re_tests

  Log Message:
  -----------
  regexec.c: CURLY* nodes must clear minmod before shortcut exits

GH #24926 showed that `"aaaa" =~ /(?:x??\x{100})*a+/` matches `a` when it
should match `aaaa`. This was because the non-greedy quantifier attached
to `x??` incorrectly bled over to affect `a+`.

Specifically, the `minmod` flag - which indicates that a non-greedy match
should be performed - was not cleared by some CURLY* regnodes prior to an
early `sayNO` (and similar) jump following an unsuccessful match.
(This bug was inadvertently introduced in 5.18.0.)

This commit adds `minmod = 0` to what look like the affected cases.



To unsubscribe from these emails, change your notification settings at 
https://github.com/Perl/perl5/settings/notifications

Reply via email to