php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75125 Segmentation fault (11) using preg_match
Submitted: 2017-08-27 15:44 UTC Modified: 2017-11-05 04:22 UTC
From: tobias at bambullis dot de Assigned:
Status: No Feedback Package: PCRE related
PHP Version: 7.2.0beta3 OS: Debian GNU/Linux 9 \n \l
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-08-27 15:44 UTC] tobias at bambullis dot de
Description:
------------
I am using this pcre version:
pcre

PCRE (Perl Compatible Regular Expressions) Support	enabled
PCRE Library Version	8.41 2017-07-05
PCRE JIT Support	enabled
Directive	Local Value	Master Value
pcre.backtrack_limit	1000000	1000000
pcre.recursion_limit	100000	100000
pcre.jit	1	1

when i am using the function preg_match it comes an error 500. Log file output:
[Sun Aug 27 15:20:43.965309 2017] [core:notice] [pid 32606:tid 139736805609088] AH00052: child pid 27928 exit signal Segmentation fault (11)

here is my configure line:
./configure --enable-maintainer-zts --with-apxs2=/usr/local/apache2/bin/apxs --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gd --with-curl --enable-cli --with-openssl --enable-soap --with-pear --with-config-file-path=/usr/local/lib --enable-mbstring --with-zlib --with-jpeg-dir=/usr --enable-zip


I installed pthreads (but if i exclude this from php.ini, the failure happens again)

Also I switched the session path to /tmp. The rest of my php.ini is default.

Test script:
---------------
$u_agent = "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/53.0.2785.143 Safari/537.36"; 

if(preg_match('/MSIE/i',$u_agent)) { // here the error occurs

	echo "ie"; 

}


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2017-08-27 15:52 UTC] requinix@php.net
-Status: Open +Status: Feedback
 [2017-08-27 15:52 UTC] requinix@php.net
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.


 [2017-11-05 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 16:01:30 2024 UTC