Bug #75223 [Com]: PCRE JIT broken in 7.2
| From: | levim@php.net | Date: | Mon, 18 Sep 2017 14:06:00 +0000 |
| Subject: | Bug #75223 [Com]: PCRE JIT broken in 7.2 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-211214@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75223&edit=1
ID: 75223
Comment by: levim@php.net
Reported by: giovanni at giacobbi dot net
Summary: PCRE JIT broken in 7.2
Status: Open
Type: Bug
Package: PCRE related
Operating System: Linux CentOS 7.4.1708
PHP Version: 7.2.0RC2
Block user comment: N
Private report: N
New Comment:
Remi, just to be sure: did you test it with Apache2 with event MPM? According to the reporter it
does not occur with the command line, only with the Apache2 with event MPM SAPI.
Previous Comments:
------------------------------------------------------------------------
[2017-09-18 13:45:41] remi@php.net
Sorry, I cannot reproduce.
$ php72 -n -i | grep PCRE
PCRE (Perl Compatible Regular Expressions) Support => enabled
PCRE Library Version => 8.41 2017-07-05
PCRE JIT Support => enabled
$ php72 -n foo.php
int(1)
int(1)
------------------------------------------------------------------------
[2017-09-18 12:14:42] danack@php.net
Please provide a backtrace.
------------------------------------------------------------------------
[2017-09-18 11:58:01] giovanni at giacobbi dot net
Description:
------------
There is a problem in preg_match() when JIT is enabled and when running through Apache2 with event
MPM. This problem does not occur with command line invocation.
Here are the versions I tested, same environment:
7.1.9 works with PCRE JIT enabled
7.2.0alpha1 broken
7.2.0rc2 broken
Build command line:
./configure \
--with-apxs2=/usr/local/apache2/bin/apxs \
--disable-cgi \
--enable-intl \
--with-layout=GNU \
--enable-maintainer-zts \
--with-gettext=static \
--with-iconv \
--with-mysqli=mysqlnd \
--enable-exif \
--with-openssl \
--with-curl
Test script:
---------------
var_dump(preg_match('/^a/', "a"));
var_dump(preg_match('/a/', "a"));
Expected result:
----------------
int(1)
int(1)
Actual result:
--------------
int(0)
segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75223&edit=1