php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69458 Delegating to current generator causes infinite loop
Submitted: 2015-04-15 08:45 UTC Modified: 2015-04-15 08:45 UTC
From: nikic@php.net Assigned: bwoebi (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: master-Git-2015-04-15 (Git) OS:
Private report: No CVE-ID: None
 [2015-04-15 08:45 UTC] nikic@php.net
Description:
------------
function gen() {
    yield from yield;
}

$g = gen();
$g->send($g);

This will cause an infinite loop. This should be throwing the "already running" exception instead, I think.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-04-15 08:45 UTC] nikic@php.net
-Assigned To: +Assigned To: bwoebi
 [2015-04-15 19:56 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3dcad2eea2f24164f2a313792bbfda5e093b4807
Log: Fix bug #69458
 [2015-04-15 19:56 UTC] bwoebi@php.net
-Status: Assigned +Status: Closed
 [2016-07-20 11:39 UTC] davey@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=3dcad2eea2f24164f2a313792bbfda5e093b4807
Log: Fix bug #69458
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon May 06 08:01:33 2024 UTC