[php-src] PR #25709: Fix PFA caching with file_cache_only after priming from SHM

From: Date: Tue, 24 Nov 2026 13:41:05 +0000
Subject: [php-src] PR #25709: Fix PFA caching with file_cache_only after priming from SHM
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40961@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25709 Author: arnaud-lb Follow up GH-25374. PFAs that can will not be cached in SHM are cached in EG(partial_function_application_cache) instead. The cache key is concat(PFA name addr, called fun addr) with the assumption that the name is not interned, therefore has a unique address. A file cache primed from SHM breaks this assumption: In that case the name is interned before being persisted to the file cache. On a subsequent file_cache_only request the PFA will not be SHM-cacheable, but its name will not be unique either. Fix by using &ast->lineno as key, which is unique as long as the AST is live. Invalidate related cache entries when destroying the AST. Fixes https://github.com/php/php-src/actions/runs/45303330074/job/138141503801#step:13:151 cc @jorgsowa

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