Bug #70674 [Asn->Csd]: ReflectionFunction::getClosure() leaks memory when used for internal functions
| From: | dmitry@php.net | Date: | Thu, 08 Oct 2015 21:46:01 +0000 |
| Subject: | Bug #70674 [Asn->Csd]: ReflectionFunction::getClosure() leaks memory when used for internal functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196478@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=70674&edit=1
ID: 70674
Updated by: dmitry@php.net
Reported by: dmitry@php.net
Summary: ReflectionFunction::getClosure() leaks memory when
used for internal functions
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reflection related
Operating System: *
PHP Version: 7.0Git-2015-10-08 (Git)
Assigned To: dmitry
Block user comment: N
Private report: N
New Comment:
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)
Previous Comments:
------------------------------------------------------------------------
[2015-10-08 21:37:37] 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 ===
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=70674&edit=1