Public bug reported:

I am reporting this bug in response to a discussion in [gnome-
terminal][1]. It looks like there has possibly been a regression from
EOAN to FOCAL in pcre2.

Given the following regex:

    <code>(?<APOS_START>(?<='))?" "(?(DEFINE)(?<S4>(?x: (?: [0-9] |
[1-9][0-9] | 1[0-9]{2} | 2[0-4][0-9] | 25[0-5] ) (?! [0-9] ) )))"
"(?(DEFINE)(?<IPV4>(?x: (?: (?&S4) \\. ){3} (?&S4) )))"
"(?(DEFINE)(?<S6>[[:xdigit:]]{1,4})(?<CS6>:(?&S6))(?<S6C>(?&S6):))"
"(?(DEFINE)(?<IPV6>(?x: (?: " "(?x: :: )" " | " "(?x: : (?&CS6){1,7} )"
" | " "(?x: (?! (?: [[:xdigit:]]*: ){8} ) (?&S6C){1,6} (?&CS6){1,6} )" "
| " "(?x: (?&S6C){1,7} : )" " | " "(?x: (?&S6C){7} (?&S6) )" " | (?: "
"(?x: (?&S6C){6} )" " | " "(?x: :: (?&S6C){0,5} )" " | " "(?x: (?! (?:
[[:xdigit:]]*: ){7} ) (?&S6C){1,4} (?&CS6){1,4} ) :" " | " "(?x:
(?&S6C){1,5} : )" " ) (?&IPV4) ) (?! [.:[:xdigit:]] ) )))"
"(?(DEFINE)(?<PATH_INNER>(?x: (?: "
"[-[:alnum:]\\Q_$.+!*,:;@&=?/~#|%'\\E]" "* (?: \\( (?&PATH_INNER) \\) |
\\[ (?&PATH_INNER) \\] ) )* " "[-[:alnum:]\\Q_$.+!*,:;@&=?/~#|%'\\E]" "*
)))" "(?(DEFINE)(?<PATH>(?x: (?: "
"[-[:alnum:]\\Q_$.+!*,:;@&=?/~#|%'\\E]" "* (?: \\( (?&PATH_INNER) \\) |
\\[ (?&PATH_INNER) \\] ) )* (?: "
"[-[:alnum:]\\Q_$.+!*,:;@&=?/~#|%'\\E]" "* (?(<APOS_START>)"
"[-[:alnum:]\\Q_$+*:@&=/~#|%\\E]" "|" "[-[:alnum:]\\Q_$+*:@&=/~#|%'\\E]"
") )? )))" "(?<!(?:" "(?x: [-[:alnum:]] | (?! [[:ascii:]] ) [[:graph:]]
)" "|[.]))(?=(?i:www|ftp))" "(?x: (?: " "(?x: [-[:alnum:]] | (?!
[[:ascii:]] ) [[:graph:]] )" "+ \\. )* " "(?x: [-[:alnum:]] | (?!
[[:ascii:]] ) [[:graph:]] )" "* (?! [0-9] ) " "(?x: [-[:alnum:]] | (?!
[[:ascii:]] ) [[:graph:]] )" "+ )" "(?x: \\:" "(?x: (?: [1-9][0-9]{0,3}
| [1-5][0-9]{4} | 6[0-4][0-9]{3} | 65[0-4][0-9]{2} | 655[0-2][0-9] |
6553[0-5] ) (?! [0-9] ) )" " )?" "(?x: /(?&PATH) )?</code>

And the following input:

    www.foo.bar/baz
    WWW3.foo.bar/baz
    FTP.FOO.BAR/BAZ
    ftpxy.foo.bar/baz

The regex should match but does actually not match.

In EOAN this still worked as I have just confirmed in a virtual machine.

[1]: https://gitlab.gnome.org/GNOME/gnome-terminal/issues/221

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: libpcre2-8-0 10.34-7
ProcVersionSignature: Ubuntu 5.4.0-14.17-generic 5.4.18
Uname: Linux 5.4.0-14-generic x86_64
ApportVersion: 2.20.11-0ubuntu17
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Sun Feb 23 15:49:32 2020
InstallationDate: Installed on 2020-02-04 (18 days ago)
InstallationMedia: Ubuntu 19.10 "Eoan Ermine" - Release amd64 (20191017)
SourcePackage: pcre2
UpgradeStatus: Upgraded to focal on 2020-02-22 (0 days ago)

** Affects: pcre2 (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1864364

Title:
  Possible Regession: PCRE2 fails to match regex

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pcre2/+bug/1864364/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to