Bug #79846 [Ver->Sus]: 8c67c166996 broke simple regexp
Edit report at https://bugs.php.net/bug.php?id=79846&edit=1
ID: 79846
Updated by: cmb@php.net
Reported by: sjon@php.net
Summary: 8c67c166996 broke simple regexp
-Status: Verified
+Status: Suspended
Type: Bug
Package: PCRE related
Operating System: archLinux
PHP Version: 8.0.0alpha2
Assigned To: cmb
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2020-07-14 09:39:19] bugreports2 at gmail dot com
> I guess that answers our question on whether it's safe to update PCRE on PHP 7.4
as long as other things like https://bugs.php.net/bug.php?id=79175 are broken
you can't win that game unless upstream applies a better QA - guess why Fedora has that much
pcre2 patches all the time and they never hit php-rsc
------------------------------------------------------------------------
[2020-07-14 09:35:27] cmb@php.net
Yes, that appears to be an upstream issue. I've filed <https://bugs.exim.org/show_bug.cgi?id=2621>.
------------------------------------------------------------------------
[2020-07-13 12:56:32] nikic@php.net
Works with -d pcre.jit=0, so presumably a PCRE JIT bug.
I guess that answers our question on whether it's safe to update PCRE on PHP 7.4...
------------------------------------------------------------------------
[2020-07-13 12:40:02] sjon@php.net
Probably the same issue also caused https://3v4l.org/ejl8v
------------------------------------------------------------------------
[2020-07-13 11:27:34] sjon@php.net
Description:
------------
I have bisected commit 8c67c166996ae1d6809f0beaf691836e37d6afc1 to fail unexpectedly on a pretty
simple regexp, see https://3v4l.org/2vTf0
pcre2test works fine implying a bug in PHP
Test script:
---------------
$item = "component_phase_1";
preg_match("/([a-z]+_[a-z]+_*[a-z]+)_?(\d+)?/", $item, $match);
var_dump($match);
Expected result:
----------------
array(3) {
[0]=>
string(17) "component_phase_1"
[1]=>
string(15) "component_phase"
[2]=>
string(1) "1"
}
Actual result:
--------------
array(0) {
}
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=79846&edit=1
Thread (10 messages)