#50741 [Fbk->Csd]: Midsized array of objects with arrays cause crash
| From: | thorsten dot engel at matrix-computer dot com | Date: | Thu, 14 Jan 2010 08:13:05 +0000 |
| Subject: | #50741 [Fbk->Csd]: Midsized array of objects with arrays cause crash | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-146628@lists.php.net to get a copy of this message | ||
ID: 50741
User updated by: thorsten dot engel at matrix-computer dot com
Reported By: thorsten dot engel at matrix-computer dot com
-Status: Feedback
+Status: Closed
Bug Type: Reproducible crash
Operating System: Win32+Gentoo Linux
PHP Version: 5.3.2RC1
New Comment:
Thanks, you *are right*. I only had 250MB as memory ;-).
With your help I could narrow down this problem to a
"__PHP_Incomplete_Class_Name" in the session that seems to cause this
problem. I'll investigate this now.
Thanks for your help.
Previous Comments:
------------------------------------------------------------------------
[2010-01-13 17:41:25] rasmus@php.net
Unable to reproduce here. What do you mean by crash? Memory is
tracked more accurately in PHP 5.3 so if you are hitting your
configured memory limit, that's not a bug. Run it without a memory
limit.
------------------------------------------------------------------------
[2010-01-13 17:36:30] thorsten dot engel at matrix-computer dot com
Description:
------------
Hi,
we love php and tried to migrate from 5.2.11 to 5.3.1 and found a
"crash" when using midsize array of objects (nesting level=2). This
problem does not exist on 5.2.4, 5.2.6, 5.2.11, but exists ins 5.3.0,
5.3.1 and 5.3.2RC1. We could reproduce it as well on win32 and on
linux.
It crashed in our case at around 10.000 on win32 and around 7600 on
linux.
It would be great if you guys can reproduce this as well!
Warm regards,
Thorsten
Reproduce code:
---------------
class test
{
protected $_a = array();
protected $_b = array();
protected $_i = array();
public function __construct($a,$b)
{
$this->_a = (array) $a;
$this->_b = (array) $b;
$this->_i = array();
if (count($a) == 0)
{
for ($i=0;$i<10;$i++)
$this->_i[$i] = new test(array('1','2'), array());
}
}
}
$s = array();
for ($i=0;$i<15000;$i++)
{
print $i.'<br>';
$x = new test(array(),array());
$s[] = $x;
}
Expected result:
----------------
completing with 15.000 lines.
Actual result:
--------------
crashing after 7.000 until 10.000 lines.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=50741&edit=1