develooper Front page | perl.perl5.changes | Postings from October 2020

[Perl/perl5] fc7dfe: regcomp: do not mark zero-width constructsSIMPLE

From:
Hugo van der Sanden via perl5-changes
Date:
October 8, 2020 12:16
Subject:
[Perl/perl5] fc7dfe: regcomp: do not mark zero-width constructsSIMPLE
Message ID:
Perl/perl5/push/refs/heads/blead/3777a0-4f0d30@github.com
  Branch: refs/heads/blead
  Home:   https://github.com/Perl/perl5
  Commit: fc7dfe8e82a76ba43c4f26b3f9c069ce79341048
      https://github.com/Perl/perl5/commit/fc7dfe8e82a76ba43c4f26b3f9c069ce79341048
  Author: Hugo van der Sanden <hv@crypt.org>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M regcomp.c

  Log Message:
  -----------
  regcomp: do not mark zero-width constructs SIMPLE

GH #17594: avoid marking them SIMPLE during compile so they will not
wrongly be permitted in STAR/PLUS/CURLY nodes: a SIMPLE node is supposed
to have width 1 (with the exception of LNBREAK as a special case).


  Commit: 4f0d304ec835f478a4dd9b4ab7af01f5b826c6d7
      https://github.com/Perl/perl5/commit/4f0d304ec835f478a4dd9b4ab7af01f5b826c6d7
  Author: Hugo van der Sanden <hv@crypt.org>
  Date:   2020-10-08 (Thu, 08 Oct 2020)

  Changed paths:
    M regexec.c

  Log Message:
  -----------
  regexec: disallow zero-width nodes in regrepeat

GH #17594: the logic here expects the node to have width 1 (except for
LNBREAK), it is not expected to do the right thing on zero-width nodes.


Compare: https://github.com/Perl/perl5/compare/3777a0a8a634...4f0d304ec835



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About