|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-10-15 08:54 UTC] judas dot iscariote at gmail dot com
[2006-10-15 09:30 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 13:00:01 2025 UTC |
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 ...