Skip to content

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

Closed

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

Activity

  1. self-assigned this
    on Jul 30, 2025
  2. added a commit that references this issue on Jul 30, 2025
    f984d6b
  3. added a commit that references this issue on Jul 31, 2025
    0406a55
  4. arnaud-lb commented on Jul 31, 2025

    @arnaud-lb
    Member

    Thank you @gal1ium!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions