ID: 40909 User updated by: adrynet at tiscali dot it Reported By: adrynet at tiscali dot it Status: Bogus Bug Type: *Regular Expressions Operating System: Linux Fedora / Redhat / CentOS PHP Version: 4.4.6 New Comment:
>You're asking wrong person, I can't answer your question since I'm not the author of PCRE. Thanks for reply Tony. Do you know if 4.4.6 uses a new release of PCRE and so we have this behaviour? Have a nice day Adriano C. Previous Comments: ------------------------------------------------------------------------ [2007-03-26 10:59:43] [EMAIL PROTECTED] >So why in this release PCRE should have "more appetite" on the same usage You're asking wrong person, I can't answer your question since I'm not the author of PCRE. ------------------------------------------------------------------------ [2007-03-26 10:48:41] adrynet at tiscali dot it Hi Tony, It's strange because with PHP 4.4.6 we got Segmentation Fault using preg_match_all() on with same regex pattern on the same source text that both in previous versions of PHP 4.4.x and 5.x works perfectly. So why in this release PCRE should have "more appetite" on the same usage? Have a nice day Adriano C. ------------------------------------------------------------------------ [2007-03-26 10:07:35] [EMAIL PROTECTED] Yet another PCRE stack overflow. We got new INI options in PHP5 in order to "limit" the appetite of PCRE, though they do not really fix the problem in PCRE library, which is known to overflow the stack on certain expressions and there are no plans on adding these options to PHP4. ------------------------------------------------------------------------ [2007-03-25 22:36:10] judas dot iscariote at gmail dot com reproducible with CVS 5_2 too. gdb --args ./sapi/cli/php ~/preg.php (gdb) run Starting program: /home/cristian/php5/sapi/cli/php /home/cristian/preg.php Program received signal SIGSEGV, Segmentation fault. 0x0000000000453d2d in match (eptr=Cannot access memory at address 0x7fff5c974b60 ) at /home/cristian/php5/ext/pcre/pcrelib/pcre_exec.c:372 372 { (gdb) bt full #0 0x0000000000453d2d in match (eptr=Cannot access memory at address 0x7fff5c974b60 ) at /home/cristian/php5/ext/pcre/pcrelib/pcre_exec.c:372 rrc = Cannot access memory at address 0x7fff5c974c48 (gdb) ------------------------------------------------------------------------ [2007-03-24 17:46:21] adrynet at tiscali dot it Description: ------------ Good morning, executing preg_match_all() function with this Regular Expression causes a PHP Segmentation Fault. The following code works correctly both with previous versions of PHP and PHP 5.2.1. Thank you for support Adriano C. Reproduce code: --------------- <?php $pattern = "/\s([\w_\.\/]+)(?:=([\'\"]?(?:[\w\d\s\?=\(\)\.,'_#\/\\:;&-]|(?:\\\\\"|\\\')?)+[\'\"]?))?/"; $context = "<simpletag an_attribute=\"simpleValueInside\">"; $match = array(); if ($result =preg_match_all($pattern, $context, $match)) { var_dump($result); } ?> Expected result: ---------------- int(1) Actual result: -------------- Segmentation Fault ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40909&edit=1