Closed
Description
Description
The following code:
<?php
$db = new Pdo\Sqlite('sqlite::memory:');
class Canary {
public function __construct(public mixed $fusion) {}
}
function g() {
Fiber::suspend();
}
function f($canary) {
var_dump(yield from g());
}
$canary = new Canary(null);
$iterable = f($canary);
$fiber = new Fiber(function () use ($iterable, $canary) {
$f = $iterable->next(...);
$f();
});
$canary->value = $fiber;
$fiber->start();
$fiber = $iterable = $canary = null;
gc_collect_cycles();
Resulted in this output:
/php-src/Zend/zend_generators.c:218: check_node_running_in_fiber: Assertion `(executor_globals.flags) & (1<<0)' failed.
Aborted (core dumped)
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04