Re: PCRE JIT broken in PHP 7.2
| From: | Dmitry Stogov | Date: | Mon, 18 Sep 2017 16:29:24 +0000 |
| Subject: | Re: PCRE JIT broken in PHP 7.2 | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-100701@lists.php.net to get a copy of this message | ||
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