Edit report at https://bugs.php.net/bug.php?id=61072&edit=1
ID: 61072 Updated by: larue...@php.net Reported by: ni...@php.net Summary: Memory leak when restoring an exception handler Status: Open Type: Bug Package: *General Issues PHP Version: Irrelevant -Assigned To: +Assigned To: laruence Block user comment: N Private report: N New Comment: Fixed in 5.3 and trunk, will close this after ci to 5.4 Previous Comments: ------------------------------------------------------------------------ [2012-02-14 05:35:34] larue...@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revision&revision=323199 Log: Fixed bug #61072 (Memory leak when restoring an exception handler) ------------------------------------------------------------------------ [2012-02-13 16:49:01] ni...@php.net Description: ------------ The script: $callback = function() { }; set_exception_handler($callback); restore_exception_handler(); Leaks: [Mon Feb 13 17:34:31 2012] Script: 'workingFile18.php' /home/nikic/dev/php-src/Zend/zend_builtin_functions.c(1610) : Freeing 0xB7893050 (20 bytes), script=workingFile18.php === Total 1 memory leaks detected === Fixing it is just a matter of adding: INIT_PZVAL(EG(user_exception_handler)); After http://lxr.php.net/xref/PHP_TRUNK/Zend/zend_builtin_functions.c#1619. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=61072&edit=1