Open
Description
Description
The following code:
<?php
$wm = new WeakMap();
for ($i = 0; $i < 30_000; $i++) {
$fusion[] = $obj = new stdClass;
$wm[$obj] = $obj;
}
$tmp = $wm;
$tmp = null;
gc_collect_cycles();
Resulted in this output:
/php-src/Zend/zend_gc.c:791: gc_remove_from_buffer: Assertion `idx' failed.
Aborted (core dumped)
To reproduce:
-d "memory_limit=8M"
PHP Version
PHP 8.4.0-dev
Operating System
ubuntu 22.04