#28125 [Asn->Csd]: ArrayObject leaks when accessing elements
ID: 28125
Updated by: helly@php.net
Reported By: adam at trachtenberg dot com
-Status: Assigned
+Status: Closed
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5.0.0RC2
Assigned To: helly
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2004-04-23 20:22:52] helly@php.net
Here's a patch to fix the open SPL issues:
http://marcus-boerger.de/php/ext/spl/spl-20040422.diff.txt
It would be nice to have it tested prior to comitting it after RC2.
------------------------------------------------------------------------
[2004-04-23 16:19:05] adam at trachtenberg dot com
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 this bug report at http://bugs.php.net/?id=28125&edit=1
Thread (3 messages)