|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2017-07-01 09:41 UTC] bwoebi@php.net
-Status: Open
+Status: Assigned
-Assigned To:
+Assigned To: bwoebi
[2017-07-01 09:52 UTC] bwoebi@php.net
[2017-07-01 09:52 UTC] bwoebi@php.net
-Status: Assigned
+Status: Closed
[2017-07-01 09:52 UTC] bwoebi@php.net
[2017-07-01 09:53 UTC] bwoebi@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 04:00:02 2025 UTC |
Description: ------------ Within generators, the temporary argument of GENERATOR_RETURN is ignored while reindexing temporaries in a finally block. This leads to illegal reuse of a still live temporary and will leak/doubly use the temporary value returned by the generator. Test script: --------------- <?php $g = (function($a) { try { return $a + 1; } finally { $b = $a + 2; var_dump($b); } yield; // Generator })(1); $g->next(); var_dump($g->getReturn()); Expected result: ---------------- int(3) int(2) Actual result: -------------- int(3) int(3)