Bug #69887 [Asn->Dup]: yield leaks temporary variables when Generator is aborted
| From: | tyrael@php.net | Date: | Tue, 23 Jun 2015 12:13:49 +0000 |
| Subject: | Bug #69887 [Asn->Dup]: yield leaks temporary variables when Generator is aborted | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-193799@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=69887&edit=1
ID: 69887
Updated by: tyrael@php.net
Reported by: bwoebi@php.net
Summary: yield leaks temporary variables when Generator is
aborted
-Status: Assigned
+Status: Duplicate
Type: Bug
Package: Scripting Engine problem
Operating System: Irrelevant
PHP Version: 7.0Git-2015-06-19 (Git)
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
we can use https://bugs.php.net/bug.php?id=62210
to track the status of this problem.
Previous Comments:
------------------------------------------------------------------------
[2015-06-19 21:36:50] nikic@php.net
This is the same issue as https://bugs.php.net/bug.php?id=62210. There is no
simple fix for it.
------------------------------------------------------------------------
[2015-06-19 21:34:01] bwoebi@php.net
Description:
------------
Temporary variables of an aborted vm stack are never freed and thus leak...
Test script:
---------------
$gen = (function(){
$tmp = 1;
[$tmp] + yield; // temporary variable created, but never freed as it halts after yield
})();
$gen->valid(); // run until first yield
Expected result:
----------------
No memory leak
Actual result:
--------------
[Fri Jun 19 23:29:53 2015] Script: '/Users/Bob/Icicle/examples/repro2.php'
Zend/zend_vm_execute.h(35171) : Freeing 0x103C5B480 (56 bytes),
script=/Users/Bob/Icicle/examples/repro2.php
[Fri Jun 19 23:29:53 2015] Script: '/Users/Bob/Icicle/examples/repro2.php'
/Users/Bob/php-src-7.0x/Zend/zend_hash.c(128) : Freeing 0x103C61B40 (264 bytes),
script=/Users/Bob/Icicle/examples/repro2.php
=== Total 2 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=69887&edit=1