#25335 [Opn]: Memory Leak with error handler and exceptions

From: Date: Thu, 11 Sep 2003 01:49:17 +0000
Subject: #25335 [Opn]: Memory Leak with error handler and exceptions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-47419@lists.php.net to get a copy of this message
ID: 25335 User updated by: cunha17 at uol dot com dot br Reported By: cunha17 at uol dot com dot br Status: Open Bug Type: Zend Engine 2 problem Operating System: RedHat Linux 9.0 PHP Version: 5CVS-2003-08-31 (dev) New Comment: Is anyone looking at this ? Previous Comments: ------------------------------------------------------------------------ [2003-08-31 19:44:50] cunha17 at uol dot com dot br Description: ------------ This code below gives some memory leak. The leak only appears when throwing exceptions inside error handler. The code I'm using is a little more complex 'cause it translates PHP errors into PHP Exceptions, but this piece of code reproduces the leak correctly. Reproduce code: --------------- <? function my_error($nr, $text, $file, $line, $vars) { throw new Exception($text); } error_reporting(E_ALL); set_error_handler("my_error"); try { include("unexistent"); } catch (Exception $e) { echo "EXCEPTION!!!"; } ?> Expected result: ---------------- EXCEPTION!!! Actual result: -------------- EXCEPTION!!!/usr/src/zend2/php-src/Zend/zend.c(914) : Freeing 0x404C9340 (16 bytes), script=leak.php === Total 1 memory leaks detected === ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25335&edit=1

« previous php.bugs (#47419) next »