#26219 [Bgs]: Segmentation fault using regexp in php versions later than 4.3.3RC1

2003-12-22 Thread peter at normann dot com
 ID:   26219
 User updated by:  peter at normann dot com
 Reported By:  peter at normann dot com
 Status:   Bogus
 Bug Type: Regexps related
 Operating System: Linux kernel 2.5.74
 PHP Version:  4.3.4
 New Comment:

Thank you Andrei.

I installed the latest pcre lib version 4.5 and linked the php-4.3.4
against it, but the problem persisted.

Then I downloaded the latest snapshot of 4.3.5-dev and compiled it
using the bundled libpcre 4.5 and... problem solved :-)


Previous Comments:


[2003-12-22 01:04:09] [EMAIL PROTECTED]

Could not reproduce with the latest PCRE library version 4.5.



[2003-11-12 13:00:37] [EMAIL PROTECTED]

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. 

Thank you for your interest in PHP.

I can verify the crash, however the crash is not the result of PHP code
but rather due to a bug in the pcre library. Please report this bug to
the maintainers of the pcre library.



[2003-11-12 11:24:19] peter at normann dot com

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...



[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('', '',
strtr($htmlshow[1],
array_flip(get_html_translation_table(HTML_ENTITIES, $output);

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







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


#26219 [Bgs]: Segmentation fault using regexp in php versions later than 4.3.3RC1

2003-12-21 Thread andrei
 ID:   26219
 Updated by:   [EMAIL PROTECTED]
 Reported By:  peter at normann dot com
 Status:   Bogus
 Bug Type: Regexps related
 Operating System: Linux kernel 2.5.74
 PHP Version:  4.3.4
 New Comment:

Could not reproduce with the latest PCRE library version 4.5.


Previous Comments:


[2003-11-12 13:00:37] [EMAIL PROTECTED]

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. 

Thank you for your interest in PHP.

I can verify the crash, however the crash is not the result of PHP code
but rather due to a bug in the pcre library. Please report this bug to
the maintainers of the pcre library.



[2003-11-12 11:24:19] peter at normann dot com

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...



[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('', '',
strtr($htmlshow[1],
array_flip(get_html_translation_table(HTML_ENTITIES, $output);

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







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