[php-src] PR #23904: Fix GH-23898: stream_filter_register() during shutdown resource release

From: Date: Fri, 25 Sep 2026 08:38:12 +0000
Subject: [php-src] PR #23904: Fix GH-23898: stream_filter_register() during shutdown resource release
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-38801@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/23904 Author: lazerg On shutdown, the user_filters RSHUTDOWN destroys user_filter_map before stream resources are released. If a filter() callback registers a filter under a new name at that point, stream_filter_register() recreates the map with only that entry, and the map leaks. Appending a filter registered earlier then finds its factory in FG(stream_filters) but no class in the new map, so ZEND_ASSERT(ce) fails. stream_filter_register() now returns false while resources are released on shutdown. The map is never recreated, and the existing NULL map check in user_filter_factory_create() handles the append. It's the same path as GH-22818 with a different filter name, and that fix only went into master, so this targets PHP-8.6. Fixes #23898

« previous php.git-pulls (#38801) next »