Skip to content

Segmentation fault in zend_unfinished_execution_gc_ex found by php-execute-fuzz #19306

@gal1ium

Description

@gal1ium

Description

The following code:

<?php
class It implements IteratorAggregate
{
    public function getIterator(): Generator
    {
        yield "";
        Fiber::suspend();
    }
}
function g()
{
    yield from new It();
}
function gen($gen)
{
    yield from $gen;
}
$a = g();
$b = gen($a);
$fiber = new Fiber(function () use ($b) {
    $b->next();
});
$fiber->start();
while ($a->valid()) {
    $a->next();
}

Resulted in this output:

Segmentation fault (core dumped)

PHP Version

16b2fc4

Operating System

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions