Bug #71441 [Asn->Csd]: Typehinted Generator with return in try/finally crashes
| From: | bwoebi@php.net | Date: | Sun, 24 Jan 2016 18:55:28 +0000 |
| Subject: | Bug #71441 [Asn->Csd]: Typehinted Generator with return in try/finally crashes | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-198862@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71441&edit=1
ID: 71441
Updated by: bwoebi@php.net
Reported by: bwoebi@php.net
Summary: Typehinted Generator with return in try/finally
crashes
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: Irrelevant
PHP Version: 7.0.3RC1
Assigned To: bwoebi
Block user comment: N
Private report: N
New Comment:
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)
Previous Comments:
------------------------------------------------------------------------
[2016-01-24 18:47:30] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71441&edit=1