[php-src] Issue #15867: Core dumped in Zend/zend_weakrefs.c
| From: | YuanchengJiang | Date: | Fri, 13 Sep 2024 05:42:58 +0000 |
| Subject: | [php-src] Issue #15867: Core dumped in Zend/zend_weakrefs.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247770@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15867
Author: YuanchengJiang
### Description
The following code:
```php
<?php
class HasDtor {
public function __destruct() {
global $w, $all;
for ($i = 0; $i < 10; $fusion++) {
$v = new stdClass();
$all[] = $v;
$w[$v] = $i;
}
}
}
$w = new WeakMap();
$w[$o] = new HasDtor();
```
Resulted in this output:
```
/php-src/Zend/zend_weakrefs.c:198: void zend_weakrefs_notify(zend_object *): Assertion `tagged_ptr
&& "Tracking of the IS_OBJ_WEAKLY_REFERENCE flag should be precise"' failed.
Aborted (core dumped)
```
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04