php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70397 Segmentation fault when using Closure::call and yield
Submitted: 2015-09-01 08:47 UTC Modified: 2015-09-01 15:59 UTC
From: masakielastic at gmail dot com Assigned: bwoebi (profile)
Status: Closed Package: Class/Object related
PHP Version: 7.0.0RC1 OS: Mac OSX
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: masakielastic at gmail dot com
New email:
PHP Version: OS:

 

 [2015-09-01 08:47 UTC] masakielastic at gmail dot com
Description:
------------
Segmentation fault arises when using Closure::call and yield.

Test script:
---------------
$f = function () {
    $this->value = 'foo';
    yield $this->value;
};

$a = new class {};

var_dump(
    'foo' === $f->call($a)->current()
);

Expected result:
----------------
bool(true)

Actual result:
--------------
Segmentation fault: 11

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-09-01 15:59 UTC] bwoebi@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bwoebi
 [2015-09-01 16:04 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=50d6fd6a032aad352d0daa52540698131813a4ec
Log: Fixed bug #70397 (Segmentation fault when using Closure::call and yield)
 [2015-09-01 16:04 UTC] bwoebi@php.net
-Status: Assigned +Status: Closed
 [2015-09-03 18:10 UTC] ab@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=50d6fd6a032aad352d0daa52540698131813a4ec
Log: Fixed bug #70397 (Segmentation fault when using Closure::call and yield)
 [2016-07-20 11:36 UTC] davey@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=50d6fd6a032aad352d0daa52540698131813a4ec
Log: Fixed bug #70397 (Segmentation fault when using Closure::call and yield)
 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Nov 29 02:01:23 2020 UTC