[php-src] PR #17835: Fix GH-17715: Handle preloaded internal function runtime cache

From: Date: Sun, 16 Feb 2025 20:12:29 +0000
Subject: [php-src] PR #17835: Fix GH-17715: Handle preloaded internal function runtime cache
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-30821@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/17835 Author: bwoebi This solely affects the builtin enum functions currently. Given that these are stored in SHM, we cannot simply hardwire a pointer into the internal function runtime cache on NTS too, but have to use a MAP_PTR (like on ZTS). Now, by design, the runtime cache of internal functions no longer is reset between requests, hence we need to store them explicitly as static runtime cache. On NTS builds we cannot trivially move the pointers into CG(internal_run_time_cache) as they're directly stored on the individual functions (on ZTS we could simply iterate the static map_ptrs). Hence, we have the choice between having opcache managing the internal run_time_cache for its preloaded functions itself or realloc CG(internal_run_time_cache) and iterate through all functions to assign the new address. We choose the latter for simplicity and initial speed. This changes the accel globals structs, but that should be fine given that they're not exported.

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