From: adam at trachtenberg dot com Operating system: * PHP version: 5CVS-2004-04-23 (dev) PHP Bug Type: Zend Engine 2 problem Bug description: ArrayObject leaks when accessing elements
Description: ------------ There's a memory leak when accessing an ArrayObject using array notation. Reproduce code: --------------- php -r '$a = new ArrayObject(array("a" => 1)); print $a["a"];' This only seems to happen to string keys. There is no leak when I do: php -r '$a = new ArrayObject(array("a")); print $a[0];' Expected result: ---------------- 1 Actual result: -------------- 1/usr/local/cvs/php-src/Zend/zend_execute.c(3382) : Freeing 0x00E14580 (16 bytes), script=- === Total 1 memory leaks detected === -- Edit bug report at http://bugs.php.net/?id=28125&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=28125&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=28125&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=28125&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=28125&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=28125&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=28125&r=needscript Try newer version: http://bugs.php.net/fix.php?id=28125&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=28125&r=support Expected behavior: http://bugs.php.net/fix.php?id=28125&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=28125&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=28125&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=28125&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28125&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=28125&r=dst IIS Stability: http://bugs.php.net/fix.php?id=28125&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=28125&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=28125&r=float