Bug #75223 [Opn->Fbk]: PCRE JIT broken in 7.2

From: Date: Mon, 18 Sep 2017 14:53:54 +0000
Subject: Bug #75223 [Opn->Fbk]: PCRE JIT broken in 7.2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-211221@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 Updated by: cmb@php.net Reported by: giovanni at giacobbi dot net Summary: PCRE JIT broken in 7.2 -Status: Open +Status: Feedback Type: Bug Package: PCRE related Operating System: Linux CentOS 7.4.1708 PHP Version: 7.2.0RC2 -Assigned To: +Assigned To: cmb Block user comment: N Private report: N New Comment: Thank you for this bug report. To properly diagnose the problem, we need a backtrace to see what is happening behind the scenes. To find out how to generate a backtrace, please read http://bugs.php.net/bugs-generating-backtrace.php for *NIX and http://bugs.php.net/bugs-generating-backtrace-win32.php for Win32 Once you have generated a backtrace, please submit it to this bug report and change the status back to "Open". Thank you for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2017-09-18 14:05:53] levim@php.net 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. ------------------------------------------------------------------------ [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

« previous php.bugs (#211221) next »