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

From: Date: Tue, 18 Jun 2002 11:09:30 +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-11124@lists.php.net to get a copy of this message
ID: 16065 Updated by: derick@php.net Reported By: ahristov@icygen.com -Status: Analyzed +Status: Closed Bug Type: Arrays related Operating System: RH 7.1 PHP Version: 4.0CVS-2002-03-1 New Comment: This bug has been fixed in CVS. You can grab a snapshot of the CVS version at http://snaps.php.net/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites. Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2002-03-14 20:51:53] yohgaki@php.net Appearently, print_r() has the same problem :) ------------------------------------------------------------------------ [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 (#11124) next »