Bug #79846 [Opn->Asn]: 8c67c166996 broke simple regexp

From: Date: Mon, 13 Jul 2020 12:56:32 +0000
Subject: Bug #79846 [Opn->Asn]: 8c67c166996 broke simple regexp
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-228006@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79846&edit=1

 ID:                 79846
 Updated by:         nikic@php.net
 Reported by:        sjon@php.net
 Summary:            8c67c166996 broke simple regexp
-Status:             Open
+Status:             Assigned
 Type:               Bug
 Package:            PCRE related
 Operating System:   archLinux
 PHP Version:        8.0.0alpha2
-Assigned To:        
+Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

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...


Previous Comments:
------------------------------------------------------------------------
[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)

« previous php.bugs (#228006) next »