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

From: Date: Sun, 11 Jan 2026 09:31:10 +0000
Subject: [php-src] Issue #20905: Assertion failure in zend_lazy_object_del_info when cloning lazy proxy
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251527@lists.php.net to get a copy of this message
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

« previous php.bugs (#251527) next »