ID: 26900
Updated by: [EMAIL PROTECTED]
Reported By: adam at trachtenberg dot com
-Status: Open
+Status: Verified
Bug Type: Zend Engine 2 problem
Operating System: *
-PHP Version: 5CVS-2004-01-13 (dev)
+PHP Version: 5CVS-2004-01-26
Previous Comments:
------------------------------------------------------------------------
[2004-01-13 18:38:07] adam at trachtenberg dot com
Description:
------------
Passing arguments to __clone() causes a memory leak. (I
know this is invalid.)
Reproduce code:
---------------
class foo {
function __clone() {}
}
$a = new foo;
$b = $a->__clone('bad argument');
Expected result:
----------------
No leaks.
Actual result:
--------------
PHP Warning: Clone method does not require arguments in
/Users/adam/php5/clone.php on line 8
/usr/local/cvs/php/php-src/Zend/zend_execute.c(2817) :
Freeing 0x00B98C30 (16 bytes), script=./clone.php
/usr/local/cvs/php/php-src/Zend/zend_execute.c(2820) :
Freeing 0x00B98AD0 (13 bytes), script=./clone.php
/usr/local/cvs/php/php-src/Zend/zend_variables.c(137) :
Actual location (location was relayed)
=== Total 2 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=26900&edit=1