ID: 39160 Comment by: judas dot iscariote at gmail dot com Reported By: Lhunath at Pandora dot Be Status: Open Bug Type: Reproducible crash Operating System: Gentoo Linux 2.6.18 PHP Version: 5.1.6 New Comment:
This issue is older than sins. and is considered the expected behaviuor. Previous Comments: ------------------------------------------------------------------------ [2006-10-15 03:11:09] Lhunath at Pandora dot Be Description: ------------ When running the code found below, PHP seems to choke in recursions. Naturally, the code itself is flawed; but this flaw should not be capable of segfaulting PHP. This can be seen as both a security and a stability flaw. Reproduce code: --------------- <? function foo($bar) { if(is_array($bar)) foreach($bar as $k => $v) print $k." => ".foo($v); else var_export($bar); } foo($GLOBALS); ?> Expected result: ---------------- Fatal error: Nesting level too deep - recursive dependency? Actual result: -------------- Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1212631376 (LWP 5087)] 0xb76bd359 in zend_hash_quick_find () from /usr/lib/apache2/modules/libphp5.so (gdb) bt #0 0xb76bd359 in zend_hash_quick_find () from /usr/lib/apache2/modules/libphp5.so #1 0xb76d4a90 in execute () from /usr/lib/apache2/modules/libphp5.so #2 0xb76d35cd in execute () from /usr/lib/apache2/modules/libphp5.so #3 0xb76d38ea in execute () from /usr/lib/apache2/modules/libphp5.so #4 0xb76d35cd in execute () from /usr/lib/apache2/modules/libphp5.so #5 0xb76d38ea in execute () from /usr/lib/apache2/modules/libphp5.so #6 0xb76d35cd in execute () from /usr/lib/apache2/modules/libphp5.so ... ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39160&edit=1