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: Assigned +Status: Closed Type: Bug Package: *General Issues PHP Version: Irrelevant Assigned To: laruence Block user comment: N Private report: N New Comment: This bug has been fixed in SVN. Snapshots of the sources are packaged every three hours; this change will be in the next snapshot. You can grab the snapshot at http://snaps.php.net/. For Windows: http://windows.php.net/snapshots/ Thank you for the report, and for helping us make PHP better. Previous Comments: ------------------------------------------------------------------------ [2012-03-02 02:56:01] larue...@php.net Automatic comment from SVN on behalf of laruence Revision: http://svn.php.net/viewvc/?view=revision&revision=323766 Log: MFH: Fixed bug #61072 (Memory leak when restoring an exception handler). ------------------------------------------------------------------------ [2012-02-14 05:36:04] larue...@php.net Fixed in 5.3 and trunk, will close this after ci to 5.4 ------------------------------------------------------------------------ [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