ID:               37375
 Updated by:       [EMAIL PROTECTED]
 Reported By:      chen dot daqi at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: linux
 PHP Version:      6CVS-2006-05-09 (CVS)
 New Comment:

Duplicate of bug #34065.


Previous Comments:
------------------------------------------------------------------------

[2006-05-09 06:08:24] chen dot daqi at gmail dot com

Description:
------------
When a exception is throwed from a foreach, memory leak will happen

Reproduce code:
---------------
<?php
try{
$ar = array(1, 2, 3);
foreach($ar as $ele)
        {
                throw new Exception("new exception");
        }
}
catch(Exception $e)
{
        echo $e->getMessage()."\n";
}
?>


Expected result:
----------------
new exception


Actual result:
--------------
new exception
[Tue May  9 13:40:13 2006]  Script:  'test.php'
/home/xlchen/php-5.1.2/Zend/zend_execute.c(843) :  Freeing 0x0847FD5C
(16 bytes)                                                             
               , script=test.php
[Tue May  9 13:40:13 2006]  Script:  'test.php'
/home/xlchen/php-5.1.2/Zend/zend_vm_execute.h(3370) :  Freeing
0x0847FCAC (35 by                                                      
                      tes), script=test.php
/home/xlchen/php-5.1.2/Zend/zend_hash.c(383) : Actual location
(location was rel                                                      
                      ayed)
Last leak repeated 2 times
[Tue May  9 13:40:13 2006]  Script:  'test.php'
/home/xlchen/php-5.1.2/Zend/zend_vm_execute.h(3339) :  Freeing
0x0846D054 (16 by                                                      
                      tes), script=test.php
Last leak repeated 2 times
[Tue May  9 13:40:13 2006]  Script:  'test.php'
/home/xlchen/php-5.1.2/Zend/zend_vm_execute.h(3320) :  Freeing
0x084809AC (32 by                                                      
                      tes), script=test.php
/home/xlchen/php-5.1.2/Zend/zend_hash.c(169) : Actual location
(location was rel                                                      
                      ayed)
Last leak repeated 1 time
=== Total 9 memory leaks detected ===



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37375&edit=1

Reply via email to