ID:               41115
 Updated by:       [EMAIL PROTECTED]
 Reported By:      hannes dot magnusson at gmail dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         Scripting Engine problem
 Operating System: *
 PHP Version:      5CVS-2007-04-17 (CVS)
 Assigned To:      stas


Previous Comments:
------------------------------------------------------------------------

[2007-11-05 21:42:16] hannes dot magnusson at gmail dot com

PHP Notice:  Indirect modification of overloaded element of foo has no
effect in /home/bjori/php/- on line 16
[Mon Nov  5 22:37:52 2007]  Script:  '-'
/home/bjori/php/5.3/Zend/zend_execute.c(453) :  Freeing 0x086228D8 (16
bytes), script=-
=== Total 1 memory leaks detected ===

------------------------------------------------------------------------

[2007-11-05 21:24:04] [EMAIL PROTECTED]

Couldn't reproduce it in neither 5.2 nor 5.3 HEAD. Does it still happen
for you? 

------------------------------------------------------------------------

[2007-08-17 23:26:52] [EMAIL PROTECTED]

Stas, you seem to have added the code where the leak emits from.. :)

------------------------------------------------------------------------

[2007-04-17 12:08:28] hannes dot magnusson at gmail dot com

Description:
------------
Creating an object from an empty value on overloaded element leaks.

Reproduce code:
---------------
<?php
class foo implements ArrayAccess {
        private $array;
        public function offsetSet($key, $value) {
                $this->array[$key] = $value;
        }
        public function offsetGet($key) {
                return $this->array[$key];
        }
        public function offsetExists($key) {}
        public function offsetUnset($key) {}
}
$foo = new foo;

$foo["bar"] = array();
$foo["bar"][0]->std = "foo";



Actual result:
--------------
Notice: Indirect modification of overloaded element of foo has no
effect in /usr/home/bjori/test/memleak.php on line 16

Strict Standards: Creating default object from empty value in
/usr/home/bjori/test/memleak.php on line 16
[Tue Apr 17 14:02:54 2007]  Script:  'memleak.php'
/usr/src/php/5.2/Zend/zend_execute.c(441) :  Freeing 0x0850535C (16
bytes), script=memleak.php
=== Total 1 memory leaks detected ===



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=41115&edit=1

Reply via email to