php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70674 ReflectionFunction::getClosure() leaks memory when used for internal functions
Submitted: 2015-10-08 21:37 UTC Modified: 2015-10-08 21:37 UTC
From: dmitry@php.net Assigned: dmitry (profile)
Status: Closed Package: Reflection related
PHP Version: 7.0Git-2015-10-08 (Git) OS: *
Private report: No CVE-ID: None
 [2015-10-08 21:37 UTC] dmitry@php.net
Description:
------------
Closures created for internal function are not released.

Test script:
---------------
<?php
var_dump(((new ReflectionFunction("strlen"))->getClosure())("hello"));
?>

Expected result:
----------------
int(5)

Actual result:
--------------
int(5)

Zend/zend_closures.c(346) :  Freeing 0xF505D1C0 (192 bytes)
=== Total 1 memory leaks detected ===


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-10-08 21:37 UTC] dmitry@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: dmitry
 [2015-10-08 21:46 UTC] dmitry@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=91fb3a7b2791f97363b085747e98d14efb23a485
Log: Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
 [2015-10-08 21:46 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2015-10-13 10:12 UTC] ab@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=91fb3a7b2791f97363b085747e98d14efb23a485
Log: Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of dmitry@zend.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=91fb3a7b2791f97363b085747e98d14efb23a485
Log: Fixed bug #70674 (ReflectionFunction::getClosure() leaks memory when used for internal functions)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 08:01:29 2024 UTC