Bug #71441 [Opn->Asn]: Typehinted Generator with return in try/finally crashes

From: Date: Sun, 24 Jan 2016 18:52:10 +0000
Subject: Bug #71441 [Opn->Asn]: Typehinted Generator with return in try/finally crashes
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-198861@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: Open +Status: Assigned Type: Bug Package: Reproducible crash Operating System: Irrelevant PHP Version: 7.0.3RC1 -Assigned To: +Assigned To: bwoebi Block user comment: N Private report: N 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

« previous php.bugs (#198861) next »