Bug #64046 [Com]: Segmentation fault in pcre library
Edit report at https://bugs.php.net/bug.php?id=64046&edit=1
ID: 64046
Comment by: krakjoe@php.net
Reported by: public at miholeus dot com
Summary: Segmentation fault in pcre library
Status: Open
Type: Bug
Package: PCRE related
Operating System: Ubuntu 12.04.1 LTS
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
This does cause a stack overflow, for some reason the default limits for
recursion are very high, maybe someone has an explanation of that.
You have:
"/'([^'])*'/"
Shouldn't that be:
"/'([^']*)'/"
?
Previous Comments:
------------------------------------------------------------------------
[2013-01-22 13:47:19] public at miholeus dot com
Description:
------------
The following code causes segmentation fault. You can see the code by link I've
provided.
Test script:
---------------
Code http://pastebin.com/UzBjDaZU
Expected result:
----------------
no segfault
Actual result:
--------------
With gdb:
(gdb) run /var/www/work/crm/trunk/pcre.php
Starting program: /usr/bin/php /var/www/work/crm/trunk/pcre.php
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7fffe42e4700 (LWP 4329)]
[Thread 0x7fffe42e4700 (LWP 4329) exited]
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff6d99a62 in ?? () from /lib/x86_64-linux-gnu/libpcre.so.3
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64046&edit=1
Thread (6 messages)