Branch: refs/heads/smoke-me/khw-17677
  Home:   https://github.com/Perl/perl5
  Commit: b98167905242904d873e71748e27ba0e599b845f
      
https://github.com/Perl/perl5/commit/b98167905242904d873e71748e27ba0e599b845f
  Author: Karl Williamson <k...@cpan.org>
  Date:   2020-04-26 (Sun, 26 Apr 2020)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  Fix panic in Unicode wildcard matching

The reason this bug occurs is that wildcard matching changes the anchor
assertions \A, \Z, and \z, without corresponding changes in regexec.c.

We earlier noticed that all these were being marked SIMPLE, and a
zero-width construct shouldn't really be.  But it was considered too
late in the development cycle to make that change.  So the plan was to
live with this bug in an experimental feature in 5.32.

But I eventually realized that the change could be effected for just the
wildcard versions, and this commit does that.  If there is some issue
with making these non-SIMPLE, it will affect only the wildcard feature,
and those potential bugs are better than a known bug.  I also seems
unlikely that this will introduce any bug.  What removing SIMPLE does is
merely remove potential optimizations in the handling.  The most general
case should work.; it's doing an improper optimization that gets one
into trouble.

Reply via email to