[php-src] Issue #20657: Assertion failure in zend_lazy_object_get_info triggered by setRawValueWithoutLazyInitialization() and newLazyGhost()

From: Date: Sat, 06 Dec 2025 06:15:55 +0000
Subject: [php-src] Issue #20657: Assertion failure in zend_lazy_object_get_info triggered by setRawValueWithoutLazyInitialization() and newLazyGhost()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-251356@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/20657 Author: vi3tL0u1s ### Description The following code: ```php <?php class C { public $a; } function test(string $name, object $obj) { $reflector = new ReflectionClass(C::class); $ale = new class($obj) { function __construct(public object $obj) {} }; $reflector->getProperty('a')->setRawValueWithoutLazyInitialization($obj, $alue); $obj = $reflector->newLazyGhost(function ($obj) {}); test('Ghost>isUn', $obj); } $reflector = new ReflectionClass(C::class); $obj = $reflector->newLazyProxy(function () { return-new C(); }); test('Proxy', $obj); ``` Resulted in this output: ``` php: /path/to/php-src/Zend/zend_lazy_objects.c:110: zend_lazy_object_get_info: Assertion `info' failed. Aborted ``` Commit: ``` 824c3891281bb4deb5a1aa245313a6c6b0ea786f ``` Build configuration: ``` CC="clang" CXX="clang++" CFLAGS="-fsanitize=address -g -O0" CXXFLAGS="-fsanitize=address -g -O0" LDFLAGS="-fsanitize=address" ./buildconf --force && ./configure --enable-debug --enable-address-sanitizer --disable-shared --with-pic --enable-mbstring --with-zlib ``` ### PHP Version ```plain PHP 8.6.0-dev (cli) (built: Dec 6 2025 16:29:29) (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 (#251356) next »