Bug #64046 [Opn->Nab]: Segmentation fault in pcre library
| From: | pajoye@php.net | Date: | Thu, 24 Jan 2013 08:35:09 +0000 |
| Subject: | Bug #64046 [Opn->Nab]: Segmentation fault in pcre library | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176214@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64046&edit=1
ID: 64046
Updated by: pajoye@php.net
Reported by: public at miholeus dot com
Summary: Segmentation fault in pcre library
-Status: Open
+Status: Not a bug
Type: Bug
Package: PCRE related
Operating System: Ubuntu 12.04.1 LTS
PHP Version: Irrelevant
Block user comment: N
Private report: N
New Comment:
Not a PHP bug but pcre recursion classic stack crash, see the numerous other
reports for more info.
Previous Comments:
------------------------------------------------------------------------
[2013-01-23 18:12:19] krakjoe@php.net
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:
"/'([^']*)'/"
?
------------------------------------------------------------------------
[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