[php-src] Issue #15823: Core dumped in Zend/zend_lazy_objects.c
| From: | YuanchengJiang | Date: | Tue, 10 Sep 2024 10:39:04 +0000 |
| Subject: | [php-src] Issue #15823: Core dumped in Zend/zend_lazy_objects.c | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-247741@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/15823
Author: YuanchengJiang
### Description
The following code:
```php
<?php
class C {
public int $a = 1;
}
function test(string $name, object $obj) {
var_dump($obj);
}
$reflector = new ReflectionClass(C::class);
$obj = $reflector->newLazyGhost(function ($obj) {
throw new Error("initializer");
});
test('Proxy', $obj);
json_encode($obj, 0, 540);
```
Resulted in this output:
```
/php-src/Zend/zend_lazy_objects.c:627: HashTable *zend_lazy_object_get_properties(zend_object *):
Assertion `!object->properties || object->properties == &zend_empty_array' failed.
Aborted (core dumped)
```
### PHP Version
PHP 8.4.0-dev
### Operating System
ubuntu 22.04