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
Status: Closed Package: Class/Object related
PHP Version: 7.0.0RC1 OS: Mac OSX
Private report: No CVE-ID:
 [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-2017 The PHP Group
All rights reserved.
Last updated: Fri Jul 21 06:01:37 2017 UTC