From: [EMAIL PROTECTED]
Operating system: *
PHP version: 5CVS-2006-07-27 (CVS)
PHP Bug Type: Scripting Engine problem
Bug description: Exception in __clone makes memory leak
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 ===
--
Edit bug report at http://bugs.php.net/?id=38234&edit=1
--
Try a CVS snapshot (PHP 4.4):
http://bugs.php.net/fix.php?id=38234&r=trysnapshot44
Try a CVS snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=38234&r=trysnapshot52
Try a CVS snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=38234&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=38234&r=fixedcvs
Fixed in release:
http://bugs.php.net/fix.php?id=38234&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=38234&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=38234&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=38234&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=38234&r=support
Expected behavior: http://bugs.php.net/fix.php?id=38234&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=38234&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=38234&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=38234&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=38234&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=38234&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=38234&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=38234&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=38234&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=38234&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=38234&r=mysqlcfg