#39093 [Opn]: several leaks appear when changing the result of __get()
| From: | tony2001@php.net | Date: | Mon, 09 Oct 2006 13:43:02 +0000 |
| Subject: | #39093 [Opn]: several leaks appear when changing the result of __get() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-103298@lists.php.net to get a copy of this message | ||
ID: 39093
Updated by: tony2001@php.net
Reported By: tony2001@php.net
Status: Open
Bug Type: Scripting Engine problem
Operating System: Linux
PHP Version: 5.2.0RC5
New Comment:
Dmitry made a patch which adds the notice:
http://tony2001.phpclub.net/dev/tmp/bug39093.diff
It doesn't fix the leaks, though.
Previous Comments:
------------------------------------------------------------------------
[2006-10-09 13:41:22] tony2001@php.net
Description:
------------
Several leaks appear in the reproduce code.
The code itself is quite weird (and cannot work), but still..
Reproduce code:
---------------
<?php
class test {
public function __get($var) {}
}
$test = new test();
$test->a["b"]["c"] = "";
?>
Expected result:
----------------
Notice: Indirect modification of overloaded property test::$a has no
effect in ..
Actual result:
--------------
==10186== 146 (16 direct, 130 indirect) bytes in 1 blocks are
definitely lost in loss record 1 of 2
==10186== at 0x401C4CE: malloc (vg_replace_malloc.c:149)
==10186== by 0x8160629: _emalloc (zend_alloc.c:1637)
==10186== by 0x8196FFA: zend_fetch_dimension_address
(zend_execute.c:1061)
==10186== by 0x81ACD45: ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:9200)
==10186== by 0x8197AF0: execute (zend_vm_execute.h:92)
==10186== by 0x816E8FF: zend_eval_string (zend_execute_API.c:1137)
==10186== by 0x816EA5F: zend_eval_string_ex
(zend_execute_API.c:1171)
==10186== by 0x81DEAC9: main (php_cli.c:1147)
==10186==
==10186==
==10186== 130 bytes in 5 blocks are indirectly lost in loss record 2 of
2
==10186== at 0x401C4CE: malloc (vg_replace_malloc.c:149)
==10186== by 0x8160629: _emalloc (zend_alloc.c:1637)
==10186== by 0x817C1C1: _array_init (zend_API.c:819)
==10186== by 0x8197081: zend_fetch_dimension_address
(zend_execute.c:1065)
==10186== by 0x81ACD45: ZEND_ASSIGN_DIM_SPEC_VAR_CONST_HANDLER
(zend_vm_execute.h:9200)
==10186== by 0x8197AF0: execute (zend_vm_execute.h:92)
==10186== by 0x816E8FF: zend_eval_string (zend_execute_API.c:1137)
==10186== by 0x816EA5F: zend_eval_string_ex
(zend_execute_API.c:1171)
==10186== by 0x81DEAC9: main (php_cli.c:1147)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39093&edit=1