Bug #75125 [NEW]: Segmentation fault (11) using preg_match

From: Date: Sun, 27 Aug 2017 15:44:14 +0000
Subject: Bug #75125 [NEW]: Segmentation fault (11) using preg_match
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-210834@lists.php.net to get a copy of this message
From:             tobias at bambullis dot de
Operating system: Debian GNU/Linux 9 \n \l
PHP version:      7.2.0beta3
Package:          PCRE related
Bug Type:         Bug
Bug description:Segmentation fault (11) using preg_match

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"; 

}


-- 
Edit bug report at https://bugs.php.net/bug.php?id=75125&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=75125&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=75125&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=75125&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=75125&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=75125&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=75125&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=75125&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=75125&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=75125&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=75125&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=75125&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=75125&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=75125&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75125&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=75125&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=75125&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=75125&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75125&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=75125&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=75125&r=mysqlcfg



Thread (3 messages)

« previous php.bugs (#210834) next »