Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1992 and 1994 t/perl/regexp.t subtests fail with pcre2-10.30-RC1 #28

Closed
ppisar opened this issue Jul 25, 2017 · 5 comments
Closed

1992 and 1994 t/perl/regexp.t subtests fail with pcre2-10.30-RC1 #28

ppisar opened this issue Jul 25, 2017 · 5 comments

Comments

@ppisar
Copy link
Contributor

ppisar commented Jul 25, 2017

PCRE2 authors released a release candidate 1 for 10.30 version and re-engine-PCRE2-0.13 fails two subtests since upgrading to the version:

$ perl -Iblib/{lib,arch} t/perl/regexp.t
[...]
ok 1991
not ok 1992 () /(?x:[a b])/xx:\N{SPACE}:yS:$&:  => `S', match=
$subject = " ";

$got = "S";

                ;
                $match = ($subject =~ m/(?x:[a b])/xx) while $c--;
                $got = "$&";

ok 1993
not ok 1994 () /(?x)[a b]/xx:\N{SPACE}:yS:$&:  => `S', match=
$subject = " ";

$got = "S";

                ;
                $match = ($subject =~ m/(?x)[a b]/xx) while $c--;
                $got = "$&";

ok 1995
ok 1996
@rurban
Copy link
Owner

rurban commented Jul 25, 2017

I incidently already fixed this today, and I'm just smoking the release candidate.
Eh, I didn't really fix it, just marked it as TODO in the 0.14 release.
Will look at it later. It was my PCRE patch which changed this I believe.

@rurban rurban closed this as completed in d96267a Jul 25, 2017
@rurban rurban reopened this Jul 25, 2017
@ppisar
Copy link
Contributor Author

ppisar commented Jul 25, 2017

I think this a bug in the new PCRE2. PCRE2 fails to match:

$ pcre2test
PCRE2 version 10.30-RC1 2017-07-18
  re> /(?x:[a b])/xx
data> " "
No match

Perl 5.26.0 matches:

$ perl -E 'say q{MATCH} if q{ } =~ /(?x:[a b])/xx'
MATCH

If I understand perlre POD, correctly, it should match because the inner switch (?x) is applied after the outer switch /xx. I will report it to the PCRE2 authors.

@rurban
Copy link
Owner

rurban commented Jul 25, 2017

Yes, it was my fault. I wrote the /xx patch. This should be fixed in RC2

@ppisar
Copy link
Contributor Author

ppisar commented Jul 25, 2017

PCRE2 bug report.

@rurban
Copy link
Owner

rurban commented Apr 8, 2019

Fixed in the proper subsequent pcre2 release.

@rurban rurban closed this as completed Apr 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants