Bug #16065 Updated: print_r() and var_dump() infinite loop.

From: Date: Fri, 15 Mar 2002 01:51:53 +0000
Subject: Bug #16065 Updated: print_r() and var_dump() infinite loop.
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-2535@lists.php.net to get a copy of this message
ID: 16065 Updated by: yohgaki@php.net -Summary: var_dump() infinite loop. Problem occured after today's patch(np w/ 4.1.2) Reported By: ahristov@icygen.com -Status: Open +Status: Analyzed Bug Type: Arrays related Operating System: RH 7.1 -PHP Version: 4.0CVS-2002-03-14 +PHP Version: 4.0CVS-2002-03-1 New Comment: Appearently, print_r() has the same problem :) Previous Comments: ------------------------------------------------------------------------ [2002-03-14 11:16:37] wez@php.net Sorry - I misread the PR. ------------------------------------------------------------------------ [2002-03-14 10:34:34] wez@php.net This bug has been fixed in CVS. ------------------------------------------------------------------------ [2002-03-14 09:26:22] ahristov@icygen.com <?php //ob_start(); $a=array(); $a[]=&$a; array_pop($a); var_dump($GLOBALS); //ob_end_flush(); ?> This piece of code causes infinite loop. If the commments are removed than this little scripts starts to eat memory too fast. 100MB for 15secs. When the physical RAM was not available started to eat from the swap. If var_export() is used no problems(with the CVS). With 4.1.2 only causes Fatal Error - too deep recursion. Proably this has something with Yasuo's patch that tried force var_dump() to work like print_r() - showing recursion not just crashing. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=16065&edit=1

« previous php.bugs (#2535) next »