ID: 25335
Updated by: [EMAIL PROTECTED]
Reported By: cunha17 at uol dot com dot br
Status: Open
Bug Type: Zend Engine 2 problem
Operating System: *
PHP Version: 5CVS-2003-08-31 (dev)
Assigned To: helly
New Comment:
For me it seems as if a zval is created after memory manager shutdown.
If this is the case we would need to return 'internal zvals' when
creating new ones after normal script runtime and also their data must
be malloced which is impossible. Or we need to prevent user functions
from beeing called after shutdown_executor() gets called.
Previous Comments:
------------------------------------------------------------------------
[2003-09-10 21:49:16] cunha17 at uol dot com dot br
Is anyone looking at this ?
------------------------------------------------------------------------
[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