Hi,
this is a small script to reproduce that problem :
<?php
class A
{
function __destruct()
{
$myArray = array();
for($i = 1; $i <= 2000; $i++) {
if(!isset($myArray[$i]))
$myArray[$i] = array();
$ref = & $myArray[$i];
$ref[] = new stdClass();
}
}
}
$a = new A();
?>
Note : that is dependent of the size of the array. With a value of 1000,
I haven't got the error.
I verify that problem on PHP 5.2.6 (debian lenny), php5.2-200902060730
and php5.3-200902101330.
And I report a bug : http://bugs.php.net/bug.php?id=47353
Thanks,
Olivier
Antony Dovgal a écrit :
On 07.02.2009 01:34, Olivier Bonvalet wrote:
And... if I'm not able to identify which part of the script do that ?
Remove parts of the code one by one, trying to see which parts affect it and
which do not.
Finally you should get only those parts of the code, which are required to
reproduce it.
I don't know valgrind, is it possible to obtain some informations about
the partion of code which produce that ?
It does show the part of the code which produces it, but the problem is
that it's part of C code, not PHP code and your issue happens on shutdown,
which means something somewhere went wrong BEFORE that point.
I suppose the name of the C functions should help to identify that, no ?
And zend_objects_store_del_ref is about object creation or destruction ?
Object destruction, right.
And, it's an object created thought zim_PDOStatement_fetchObject ?
It seems so, yes.
It makes sense to start looking into that direction if you want to create a reproduce script.
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php