ID:               26219
 User updated by:  peter at normann dot com
 Reported By:      peter at normann dot com
-Status:           Feedback
+Status:           Open
 Bug Type:         Regexps related
 Operating System: Linux kernel 2.5.74
 PHP Version:      4.3.4
 New Comment:

It's rather lengthy, but I have provided it at 
http://www.normann.com/bug/buggy.txt

Also, the whole function can be found at 
http://www.normann.com/bug/bug_code.txt

Thank you for taking your time...


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

[2003-11-12 11:00:03] [EMAIL PROTECTED]

Please provide sample of source text on which the regex operates.

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

[2003-11-12 09:46:00] peter at normann dot com

Description:
------------
php crashes when using the preg_match function. Code included below.
Works in php4.3.3RC1 but any later version causes segmentation fault.

The code is part of a text filter.

$output contains text with plain text and html mixed. The idea is
anything between [html] and [/html] will go untouched by the filter.

I use dozens of other regular expressions, but preg_match is a sure
killer. I can easily reproduce this behavior.



Reproduce code:
---------------
while (preg_match('/\[html]((.|\s)+?)\[\/html]/', $output, $htmlshow))
$output = str_replace($htmlshow[0], str_replace('<br />', '',
strtr($htmlshow[1],
array_flip(get_html_translation_table(HTML_ENTITIES)))), $output);

Actual result:
--------------
child pid xxxxx exit signal Segmentation fault (11)




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


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

Reply via email to