[php-src] PR #24005: ext/standard: Pin lazy proxy instances while reading properties
| From: | iliaal | Date: | Tue, 29 Sep 2026 23:14:23 +0000 |
| Subject: | [php-src] PR #24005: ext/standard: Pin lazy proxy instances while reading properties | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-38962@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24005
Author: iliaal
serialize() and var_export() take an initialized lazy proxy's real property table without
holding that instance. User code during __sleep() name resolution, or while exporting properties,
can reset the proxy and free the instance before those properties are read. The real instance is now
pinned until the property table is released. var_dump() and debug_zval_dump() already addref the
instance in their debug info. The test keeps replacement objects alive so an unpatched build
serializes the reused values.