From: thorsten dot engel at matrix-computer dot com Operating system: Win32+Gentoo Linux PHP version: 5.3.2RC1 PHP Bug Type: Reproducible crash Bug description: Midsized array of objects with arrays cause crash
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 bug report at http://bugs.php.net/?id=50741&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50741&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50741&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50741&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50741&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50741&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50741&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50741&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50741&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50741&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50741&r=support Expected behavior: http://bugs.php.net/fix.php?id=50741&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50741&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50741&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50741&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50741&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50741&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50741&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50741&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50741&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50741&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50741&r=mysqlcfg