Category
bug · php-in-php · Trust / #32122 .1 mint class · ensureFullStandaloneBodies shrink
Problem
Context::ensureFullStandaloneBodies still NestedJITs SuperglobalRefreshRuntime (__superglobals__refresh) during full standalone init. Every full standalone pays that during init — leftover Context NestedJIT vs Runtime ABI drift mints superglobals_refresh.1 (#31894 / #32122).
Peer #35133 already deferred CliArgv to compileToFile for every LOAD_TYPE_STANDALONE. Thin path already uses ensureUserScriptRefreshEmit before main. Full path still ensures inside ensureFullStandaloneBodies.
Call sites / main already need the symbol before lookup:
compileToFile standalone main calls lookupFunction('__superglobals__refresh')
- thin:
SuperglobalRefreshRuntime::ensureUserScriptRefreshEmit
JIT.php ensureLinked before resolve
- bootstrap-aot:
ensureBootstrapAotStandaloneBodies keeps fixtures linked
php-src reference
PHP implementation target
Repro
./script/aot-smoke.sh # must stay 8/8
./script/phpunit.sh --filter ContextFullStandaloneLazySuperglobalRefresh
Done when
Category
bug· php-in-php · Trust / #32122.1mint class · ensureFullStandaloneBodies shrinkProblem
Context::ensureFullStandaloneBodiesstill NestedJITsSuperglobalRefreshRuntime(__superglobals__refresh) during full standalone init. Every full standalone pays that during init — leftover Context NestedJIT vs Runtime ABI drift mintssuperglobals_refresh.1(#31894 / #32122).Peer #35133 already deferred CliArgv to
compileToFilefor everyLOAD_TYPE_STANDALONE. Thin path already usesensureUserScriptRefreshEmitbefore main. Full path still ensures insideensureFullStandaloneBodies.Call sites / main already need the symbol before lookup:
compileToFilestandalone main callslookupFunction('__superglobals__refresh')SuperglobalRefreshRuntime::ensureUserScriptRefreshEmitJIT.phpensureLinked before resolveensureBootstrapAotStandaloneBodieskeeps fixtures linkedphp-src reference
main/php_variables.c— CGI/CLI SAPI variable import /$\_SERVERrefreshPHP implementation target
lib/JIT/Context.phpensureFullStandaloneBodies— removeSuperglobalRefreshRuntime::ensureStandaloneBodieslib/JIT/Context.phpcompileToFile— ensure SuperglobalRefresh for everyLOAD_TYPE_STANDALONEbefore main emits__superglobals__refresh(thin keepensureUserScriptRefreshEmitor unify viaensureStandaloneBodies)ensureBootstrapAotStandaloneBodieslink for bootstrap-aot fixturesContextFullStandaloneLazyCliArgvRuntimeShrinkTest/ php-in-php: drop Context ensureFullStandaloneBodies always-on CliArgvRuntime — lazy at compileToFile / CliArgvGlobalInit (ext/standard/basic_functions.c) #35133Repro
./script/aot-smoke.sh # must stay 8/8 ./script/phpunit.sh --filter ContextFullStandaloneLazySuperglobalRefreshDone when
ensureFullStandaloneBodiesdoes not callSuperglobalRefreshRuntime::ensureStandaloneBodies/ensureLinkedcompileToFileensures SuperglobalRefresh for all standalone before__superglobals__refresh./script/aot-smoke.sh→ 8/8runtime/*.c