Bug #70674 [Opn->Asn]: ReflectionFunction::getClosure() leaks memory when used for internal functions
| From: | dmitry@php.net | Date: | Thu, 08 Oct 2015 21:37:58 +0000 |
| Subject: | Bug #70674 [Opn->Asn]: ReflectionFunction::getClosure() leaks memory when used for internal functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-196480@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: Open
+Status: Assigned
Type: Bug
Package: Reflection related
Operating System: *
PHP Version: 7.0Git-2015-10-08 (Git)
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
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