ID:               29044
 Updated by:       [EMAIL PROTECTED]
 Reported By:      tomas_matousek at hotmail dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Reproducible crash
-Operating System: WinXP
+Operating System: *
 PHP Version:      5.0.0RC3
 New Comment:

Nothing much we could do about it. 
Detecting a recursion at the same level, as in your example, is easy
but detecting multi-level recursion is very hard. Also it would slow
down the function very much and require lots of memory when it is used
with multi level arrays.

Maybe we can disallow array references or something like that. Patch is
here:

http://marcus-boerger.de/php/ext/bug29044.diff.txt

please try.


Previous Comments:
------------------------------------------------------------------------

[2004-07-07 10:39:37] tomas_matousek at hotmail dot com

Description:
------------
The compact() function crashes (terminates PHP process) if an array
with infinite recursion is passed to it.

Reproduce code:
---------------
$a = array(&$a);
compact($a);

Expected result:
----------------
none

Actual result:
--------------
crash


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29044&edit=1

Reply via email to