[php-src] PR #21281: Fix preloaded constant propagated to file-cached script

From: Date: Mon, 23 Feb 2026 21:37:36 +0000
Subject: [php-src] PR #21281: Fix preloaded constant propagated to file-cached script
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-34999@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/21281 Author: iluuu1994 Since GH-15021 preloaded constants are propagated to compiled scripts. This is problematic for file cache, which assumes all referenced zvals are either persistently allocated or local to the current script. However, preloaded constants live in shm as immutable, but not persistent. To solve this, we'd need to duplicate propagated constants in the optimizer when file cache is used. This is error prone given it needs to happen in many places. It's debatable whether constant propagation is even correct in this case, as running the preloaded script on a restart isn't guaranteed to produce the same result. Hence, avoid the issue for now by just not relying on preloaded symbols when file cache is used. Fixes GH-21052

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