php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71441 Typehinted Generator with return in try/finally crashes
Submitted: 2016-01-24 18:47 UTC Modified: 2016-01-24 18:52 UTC
From: bwoebi@php.net Assigned: bwoebi (profile)
Status: Closed Package: Reproducible crash
PHP Version: 7.0.3RC1 OS: Irrelevant
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: bwoebi@php.net
New email:
PHP Version: OS:

 

 [2016-01-24 18:47 UTC] bwoebi@php.net
Description:
------------
Returns in try/finally in Generators with typehint modify the FAST_CALL opcode (which is next to VERIFY_RETURN), hence it crashes (or may behave strangely if executed).

Test script:
---------------
function (): \Generator {
        try {
                $foo = 1;
                return yield $foo;
        } finally {
                print "Ok\n";
        }
};


Expected result:
----------------
No crash / normal behavior


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-01-24 18:52 UTC] bwoebi@php.net
-Status: Open +Status: Assigned -Assigned To: +Assigned To: bwoebi
 [2016-01-24 18:55 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=001ce475ee158cbf020755f1f65aade28caafd73
Log: Fixed bug #71441 (Typehinted Generator with return in try/finally crashes)
 [2016-01-24 18:55 UTC] bwoebi@php.net
-Status: Assigned +Status: Closed
 [2016-01-24 18:55 UTC] bwoebi@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=001ce475ee158cbf020755f1f65aade28caafd73
Log: Fixed bug #71441 (Typehinted Generator with return in try/finally crashes)
 [2016-07-20 11:33 UTC] davey@php.net
Automatic comment on behalf of bobwei9@hotmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=001ce475ee158cbf020755f1f65aade28caafd73
Log: Fixed bug #71441 (Typehinted Generator with return in try/finally crashes)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 12:01:29 2024 UTC