Bug #52614 [Asn->Csd]: Memory leak when writing on uninitialized variable returned from method call
| From: | dmitry@php.net | Date: | Wed, 25 Aug 2010 09:15:10 +0000 |
| Subject: | Bug #52614 [Asn->Csd]: Memory leak when writing on uninitialized variable returned from method call | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-153779@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=52614&edit=1
ID: 52614
Updated by: dmitry@php.net
Reported by: felipe@php.net
Summary: Memory leak when writing on uninitialized variable
returned from method call
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: Irrelevant
Assigned To: dmitry
Block user comment: N
New Comment:
This bug has been fixed in SVN.
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:
------------------------------------------------------------------------
[2010-08-25 11:14:38] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=302764
Log: Fixed bug #52614 (Memory leak when writing on uninitialized
variable returned from method call)
------------------------------------------------------------------------
[2010-08-15 19:12:43] felipe@php.net
Description:
------------
See below. It is just like the #52041, but on method calls.
Test script:
---------------
<?php
class foo {
public $x;
public function test() {
return $this->x;
}
}
$foo = new foo;
$foo->test()->a = 1;
Expected result:
----------------
No memory leak
Actual result:
--------------
[Sun Aug 15 14:09:42 2010] Script: '../bug.php'
/home/felipe/dev/phptrunk/Zend/zend_execute.c(693) : Freeing 0xB7C09524
(20 bytes), script=../bug.php
=== Total 1 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=52614&edit=1