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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: dmitry@php.net
New email:
PHP Version: OS:

 

 [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: Tue Dec 03 16:01:33 2024 UTC