[php-src] PR #24754: streams: Keep user wrappers alive across URL operations
| From: | iliaal | Date: | Mon, 26 Oct 2026 17:53:38 +0000 |
| Subject: | [php-src] PR #24754: streams: Keep user wrappers alive across URL operations | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39926@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24754
Author: iliaal
A user stream wrapper whose constructor or destructor calls stream_wrapper_unregister() frees the
wrapper while unlink(), rename(), mkdir(), rmdir(), touch(), chmod() or stat() is still using it,
and when the method is not implemented the "is not implemented!" warning reads the freed
wrapper. user_wrapper_opener() and user_wrapper_opendir() already hold a reference to the wrapper
resource across the user calls; the URL operations now do the same. Found while reviewing #24711,
which fixes the separate opendir() regression on PHP-8.6.