#39607 [Fbk->Bgs]: preg_match_all Segmentation fault
| From: | nlopess@php.net | Date: | Fri, 24 Nov 2006 14:19:50 +0000 |
| Subject: | #39607 [Fbk->Bgs]: preg_match_all Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-105410@lists.php.net to get a copy of this message | ||
ID: 39607
Updated by: nlopess@php.net
Reported By: dimanjy23 at mail dot ru
-Status: Feedback
+Status: Bogus
Bug Type: PCRE related
Operating System: Linux Fedora Core 5
PHP Version: 5.2.0
New Comment:
Stack overflow problem. Not a bug in PHP (you may limit the recursion
limit. please check the manual for more info)
Previous Comments:
------------------------------------------------------------------------
[2006-11-24 09:01:23] tony2001@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.
Cannot reproduce.
------------------------------------------------------------------------
[2006-11-23 14:21:13] dimanjy23 at mail dot ru
Description:
------------
I installed the latest snapshot of PHP 5.2.0-dev compilen 2006-11-22.
Sometimes (not always) preg_match_all couses the "Segmentation fault"
error while processing some content.
Reproduce code:
---------------
<?php
echo "Start\n";
// preg_match_all crashes on this file
$content = file_get_contents("http://makl.ru/content.txt");
// Regexp
$pattern="/<form[^<>]*>((.(?!\/form>))+)<\/form>/si";
$res = array();
preg_match_all($pattern,$content,$res);
echo "\n\nDone!";
var_dump($res);
?>
Expected result:
----------------
Expecting the part of text from content.txt between
<form> ... </form> tags.
Actual result:
--------------
Start
Segmentation fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39607&edit=1