Edit report at https://bugs.php.net/bug.php?id=60419&edit=1

 ID:                 60419
 Updated by:         [email protected]
 Reported by:        mikemc-phpbug at terabytemedia dot com
 Summary:            PCRE segfault
-Status:             Open
+Status:             Bogus
 Type:               Bug
 Package:            PCRE related
 Operating System:   linux
 PHP Version:        5.3.8
 Block user comment: N
 Private report:     N

 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

Not a PHP bug. Check out other already PCRE related bugs or the PCRE 
documentation. I.e. it's a known behavior from PCRE lib.


Previous Comments:
------------------------------------------------------------------------
[2011-11-30 16:27:45] mikemc-phpbug at terabytemedia dot com

Removing the "\s?" from the pattern alleviates the issue (no crashing), but of 
course, then the pattern does not serve a purpose for me.

------------------------------------------------------------------------
[2011-11-30 16:23:21] mikemc-phpbug at terabytemedia dot com

Description:
------------
Tested this on my custom built 5.3.8 and the standard 5.3.8 that ships with FC 
15 - same result in both so I assume it is not specific to my build.  Run the 
test code - it will segfault.  Not sure if this is PHP related (PHP hooks into 
PCRE) or solely lives inside PCRE.

Test script:
---------------
<?php

$input = "
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
 
.................................................................................................................................................................................................
";
echo preg_replace('/(\.\s?){3,}/', '...', $input);

Expected result:
----------------
Not to dump core

Actual result:
--------------
Dumped core


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



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

Reply via email to