Edit report at https://bugs.php.net/bug.php?id=65393&edit=1
ID: 65393 Updated by: larue...@php.net Reported by: lukyrys at gmail dot com Summary: SIGSEGV -Status: Feedback +Status: Not a bug Type: Bug Package: PCRE related Operating System: Debian 7.1 PHP Version: 5.4.17 Block user comment: N Private report: N New Comment: hi, this is obviously a stack overflow issue. no bug here. please refer to http://www.php.net/manual/en/pcre.configuration.php#ini.pcre.recursion-limit Previous Comments: ------------------------------------------------------------------------ [2013-08-06 04:43:32] yohg...@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. We also needs complete backtrace. Please attach backtrace also. https://wiki.debian.org/HowToGetABacktrace ------------------------------------------------------------------------ [2013-08-06 04:41:46] yohg...@php.net Cannot reproduce w/o input. php > $html = file_get_contents('http://edition.cnn.com/'); php > preg_match_all('#<a.*?href="([^<>]*?)\?img_id=(\d+)"\s*>((?<!href).)* <img.*?src="(.*?)"#i',$html,$outA); php > var_dump($outA); array(5) { [0]=> array(0) { } [1]=> array(0) { } [2]=> array(0) { } [3]=> array(0) { } [4]=> array(0) { } } php > Could you provide short self contained "complete" script that reproduce segfault? ------------------------------------------------------------------------ [2013-08-05 12:14:26] lukyrys at gmail dot com Description: ------------ Hello, i have a problem with php when i use pcre regexp ((?<!href).) Test script: --------------- preg_match_all('#<a.*?href="([^<>]*?)\?img_id=(\d+)"\s*>((?<!href).)*<img.*?src="(.*?)"#i',$html,$outA) Expected result: ---------------- array Actual result: -------------- Reading symbols from /usr/bin/php...(no debugging symbols found)...done. (gdb) run /var/www/502.cz/web/nod/onny/index.php Starting program: /usr/bin/php /var/www/502.cz/web/nod/onny/index.php [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7fffec495700 (LWP 12351)] [Thread 0x7fffec495700 (LWP 12351) exited] Program received signal SIGSEGV, Segmentation fault. 0x00000000004811ed in ?? () (gdb) bt #0 0x00000000004811ed in ?? () #1 0x0000000000483496 in ?? () #2 0x000000000048f798 in ?? () #3 0x0000000000483496 in ?? () #4 0x000000000048f798 in ?? () #5 0x0000000000483496 in ?? () .... same lines #10900 0x0000000000483496 in ?? () #10901 0x000000000048fa8c in ?? () #10902 0x0000000000492e0c in php_pcre_exec () #10903 0x0000000000497ba8 in php_pcre_match_impl () #10904 0x0000000000498538 in ?? () #10905 0x000000000076a0f1 in ?? () #10906 0x0000000000723f87 in execute () #10907 0x00000000006c44dc in zend_execute_scripts () #10908 0x0000000000664523 in php_execute_script () #10909 0x000000000076ca83 in ?? () #10910 0x000000000043181a in ?? () #10911 0x00007ffff53b4ead in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6 #10912 0x00000000004318ad in _start () ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=65393&edit=1