[php-src] PR #25151: Fix GH-25149: Leak of class constant type names in uncached classes
| From: | lazerg | Date: | Mon, 02 Nov 2026 14:01:24 +0000 |
| Subject: | [php-src] PR #25151: Fix GH-25149: Leak of class constant type names in uncached classes | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-40222@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/25151
Author: lazerg
destroy_zend_class() never released the type of user class constants. Without opcache the class
names in those types are interned, so nothing showed up, but with opcache they stay refcounted until
persistence, and any class that isn't cached (eval'd code, the parser fuzzer) leaks them.
The type is now released for constants the class owns, same as property types. Inherited CONST_OWNED
copies are skipped since they share the parent's type.
Fixes #25149