|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-07-27 10:45 UTC] dmitry@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 15:00:01 2025 UTC |
Description: ------------ PHP makes a memory leak in case if script throws exception from inside __clone() method. Reproduce code: --------------- <?php class Foo { function __clone() { throw new Exception(); } } try { $x = new Foo(); $y = clone $x; } catch (Exception $e) { } echo "ok\n"; ?> Expected result: ---------------- ok Actual result: -------------- ok [Thu Jul 27 14:21:47 2006] Script: 'x.php' /home/dmitry/php/php5.2/Zend/zend_vm_execute.h(19949) : Freeing 0xB7ECBFF8 (16 bytes), script=x.php === Total 1 memory leaks detected ===