[php-src] PR #24428: TSRM: attach pthread_key/fls callbacks for thread cleanup
| From: | henderkes | Date: | Mon, 19 Oct 2026 12:43:07 +0000 |
| Subject: | [php-src] PR #24428: TSRM: attach pthread_key/fls callbacks for thread cleanup | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-39591@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/24428
Author: henderkes
... to automatically call
ts_free_thread at thread exit
SAPI's should already been doing this on their own before, but the apache2handler doesn't
get control over threads, so it didn't call ts_free_thread and therefore started leaking
resources with the move of per-thread globals from heap storage to native __thread storage
@shivammathur's requests in https://github.com/php/php-src/pull/23227
Will need minimal adjusting in the eg/cg move later, but it can already be merged standalone.
cc @arnaud-lb