Bug #80240 [Asn->Csd]: Use after free multi yield from
Edit report at https://bugs.php.net/bug.php?id=80240&edit=1
ID: 80240
Updated by: nikic@php.net
Reported by: nikic@php.net
Summary: Use after free multi yield from
-Status: Assigned
+Status: Closed
Type: Bug
Package: Scripting Engine problem
PHP Version: 8.0.0rc1
Assigned To: nikic
Block user comment: N
Private report: N
New Comment:
Fixed by https://github.com/php/php-src/pull/6344.
Previous Comments:
------------------------------------------------------------------------
[2020-10-15 13:09:51] nikic@php.net
Description:
------------
@bwoebi came up with this reduction of oss-fuzz #25697 a while ago, report a bug to make sure it
doesn't get lost in a chat log...
Test script:
---------------
<?php
function gen() {
yield 0;
yield from gen();
}
function bar($gen) {
yield from $gen;
}
$gen = gen();
$a = bar($gen);
$b = bar($gen);
$a->rewind();
$b->rewind();
$a->next();
unset($gen);
unset($a);
unset($b);
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=80240&edit=1
Thread (2 messages)