Re: PCRE JIT broken in PHP 7.2
| From: | Dmitry Stogov | Date: | Mon, 18 Sep 2017 17:04:12 +0000 |
| Subject: | Re: PCRE JIT broken in PHP 7.2 | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100702@lists.php.net to get a copy of this message | ||
This commit should fix the problem https://github.com/php/php-src/commit/5ef10d08ec2d0823fb21ad189dacfb43d900a0b5
Thanks. Dmitry.
________________________________
From: Dmitry Stogov <dmitry@zend.com>
Sent: Monday, September 18, 2017 7:29:24 PM
To: Giovanni Giacobbi; PHP Internals List
Subject: Re: [PHP-DEV] PCRE JIT broken in PHP 7.2
[This sender failed our fraud detection checks and may not be who they appear to be. Learn about
spoofing at http://aka.ms/LearnAboutSpoofing]
The problem may be caused by "incorrect" dynamic linking to different libpcre instances.
e.g one libbcre is use by Apache or some Apache module and another is embedded into PHP.
The backtrace would be useful, to prove this guess.
Thanks. Dmitry.
________________________________
From: giovanni.g@gmail.com <giovanni.g@gmail.com> on behalf of Giovanni Giacobbi
<giovanni@giacobbi.net>
Sent: Monday, September 18, 2017 2:28:35 PM
To: PHP Internals List
Subject: [PHP-DEV] PCRE JIT broken in PHP 7.2
Greetings,
just an heads up, I started testing my project with PHP 7.2.0RC2 but it was
causing a segmentation fault.
I tracked down the problem to preg_match(), in particular when JIT is
enabled and ONLY 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 \
--with-fpm-user=httpd \
--with-fpm-group=httpd \
--disable-cgi \
--enable-intl \
--with-layout=GNU \
--enable-maintainer-zts \
--with-gettext=static \
--with-iconv \
--with-mysqli=mysqlnd \
--enable-exif \
--with-openssl \
--with-curl
The effect i observed is the following:
var_dump(preg_match('/^a/', "a")); => int(0)
var_dump(preg_match('/a/', "a")); => segmentation fault
If you need any further information let me know.
Kind regards
--
Giovanni Giacobbi