#39093 [NEW]: several leaks appear when changing the result of __get()

From: Date: Mon, 09 Oct 2006 13:41:22 +0000
Subject: #39093 [NEW]: several leaks appear when changing the result of __get()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103297@lists.php.net to get a copy of this message
From: tony2001@php.net Operating system: Linux PHP version: 5.2.0RC5 PHP Bug Type: Scripting Engine problem Bug description: several leaks appear when changing the result of __get() 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 bug report at http://bugs.php.net/?id=39093&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39093&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39093&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39093&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39093&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39093&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39093&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39093&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39093&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39093&r=support Expected behavior: http://bugs.php.net/fix.php?id=39093&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39093&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39093&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39093&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39093&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39093&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39093&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39093&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39093&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39093&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39093&r=mysqlcfg

« previous php.bugs (#103297) next »