[php-src] Issue #20905: Assertion failure in zend_lazy_object_del_info when cloning lazy proxy

[email protected] (vi3tL0u1s)
Newsgroups php.bugs
Message-ID <[email protected]>
Issue: https://github.com/php/php-src/issues/20905
Author: vi3tL0u1s

### Description

The following code:

```php
<?php
class A {
    public stdClass $p;
    public function __construct() { $this->p = new stdClass; }
    public function __clone() { function f() {} }
}
$r = new ReflectionClass(A::class);
clone $r->newLazyGhost(fn($o) => $o->__construct());
clone $r->newLazyProxy(fn() => new A);
```

Resulted in this output:
```
php: /path/to/php-src/Zend/zend_lazy_objects.c:165: zend_lazy_object_del_info: Assertion `res == SUCCESS' failed.
Aborted
```

## Commit

`2813f62476f6fb1b8d59f25527dbf2953fdf69a7`

## Configurations

```
./configure --enable-debug --enable-address-sanitizer --disable-shared --with-pic --enable-mbstring --with-zlib
```


### PHP Version

```plain
PHP 8.6.0-dev (cli) (built: Jan 11 2026 13:54:51) (NTS DEBUG)
Copyright (c) The PHP Group
Zend Engine v4.6.0-dev, Copyright (c) Zend Technologies
    with Zend OPcache v8.6.0-dev, Copyright (c), by Zend Technologies
```

### Operating System

Ubuntu 22.04
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.