|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-02-04 20:02 UTC] helly@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 16:00:02 2025 UTC |
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 ===