[php-src] Issue #15866: Core dumped in Zend/zend_generators.c
| From: | YuanchengJiang | Date: | Fri, 13 Sep 2024 05:20:16 +0000 |
| Subject: | [php-src] Issue #15866: Core dumped in Zend/zend_generators.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247769@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15866
Author: YuanchengJiang
### Description
The following code:
```php
<?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