ID:               45735
 Updated by:       [EMAIL PROTECTED]
 Reported By:      johnston dot joshua at gmail dot com
-Status:           Open
+Status:           Verified
 Bug Type:         PCRE related
 Operating System: *
 PHP Version:      5.2CVS, 5.3CVS, 6CVS (2008-08-06)


Previous Comments:
------------------------------------------------------------------------

[2008-08-06 15:22:20] johnston dot joshua at gmail dot com

Description:
------------
When running a preg_match with a capturing subpattern against large
input, php crashes with a Segmentation Fault
I tested this on OS X and OpenSuSE, same result
OS X:~$ php -v
PHP 5.2.6 (cli) (built: Jul 15 2008 12:18:21) 

OpenSuSE:~# php -v
PHP 4.4.7 (cgi) (built: May 12 2008 10:19:51)

Reproduce code:
---------------
<?php
preg_match("/http:\/\/(.)+\.ru/i", str_repeat("http://google.ru";,
2000));
?>

Expected result:
----------------
PHP should handle the error or something other than letting PCRE crash
php

Actual result:
--------------
jjohnston:~$ php -r 'preg_match("/http:\/\/(.)+\.ru/i",
str_repeat("http://google.ru";, 2000));'
Segmentation fault


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45735&edit=1

Reply via email to