Bug #69149 [NEW]: The PCRE extension crashes

From: Date: Sat, 28 Feb 2015 23:18:03 +0000
Subject: Bug #69149 [NEW]: The PCRE extension crashes
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-191009@lists.php.net to get a copy of this message
From: gregory at luni dot fr Operating system: OSX, Linux PHP version: master-Git-2015-02-28 (Git) Package: *Regular Expressions Bug Type: Bug Bug description:The PCRE extension crashes Description: ------------ There is an error on the PCRE extension and memory management, I can't determine exactly what's happening, I have These 2 types of messages : php7(42118,0x7fff7e1dd300) malloc: *** error for object 0x7f8022f02b28: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort trap: 6 Assertion failed: (function->type == 1), function zend_function_dtor, file /Users/gplanchat/CLionProjects/php-src/Zend/zend_opcode.c, line 122. Abort trap: 6 This is the configure command I used on my mac : ./configure --prefix=$HOME/tmp/usr --with-config-file-path=$HOME/tmp/usr/etc --enable-mbstring --enable-zip --enable-bcmath --enable-pcntl --enable-ftp --enable-exif --enable-calendar --enable-sysvmsg --enable-sysvsem --enable-sysvshm --enable-wddx --with-curl --with-mcrypt --with-iconv --with-gmp --with-gd --with-jpeg-dir=/usr/local/opt/jpeg/include/ --with-png-dir=/usr/local/opt/libpng/include/ --with-zlib-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --enable-gd-native-ttf --enable-gd-jis-conv --with-openssl --with-pdo-mysql=mysqlnd --with-gettext=/usr/local/opt/gettext/ --with-zlib=/usr --with-bz2=/usr --with-recode=/usr --with-mysqli=mysqlnd --enable-debug --enable-maintainer-mode I'm using OSX 10.10 Yosemite, with the latest master (34ff6bbb0df152694e648161b149d41270fccdcb). Test script: --------------- <?php $buffer = 'public function test(){return true;}'; preg_match('/(?:public|protected|private|final|abstract|static)*?' . '\s+function\s+test\([^\)]*\)\s*(?:\{(?:[^{}]*|(?R))*\})/sm', $buffer, $matches); var_dump($matches[0]); Expected result: ---------------- string(36) "public function test(){return true;}" Actual result: -------------- Either : php7(42118,0x7fff7e1dd300) malloc: *** error for object 0x7f8022f02b28: incorrect checksum for freed object - object was probably modified after being freed. *** set a breakpoint in malloc_error_break to debug Abort trap: 6 Or either : Assertion failed: (function->type == 1), function zend_function_dtor, file /Users/gplanchat/CLionProjects/php-src/Zend/zend_opcode.c, line 122. Abort trap: 6 -- Edit bug report at https://bugs.php.net/bug.php?id=69149&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69149&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69149&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69149&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=69149&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=69149&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=69149&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=69149&r=needscript Try newer version: https://bugs.php.net/fix.php?id=69149&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=69149&r=support Expected behavior: https://bugs.php.net/fix.php?id=69149&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=69149&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=69149&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=69149&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69149&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=69149&r=dst IIS Stability: https://bugs.php.net/fix.php?id=69149&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=69149&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=69149&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=69149&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=69149&r=mysqlcfg

« previous php.bugs (#191009) next »