Category
bug · php-in-php · Trust / #32122 .1 mint class · ensureFullStandaloneBodies shrink
Problem
Context::ensureFullStandaloneBodies still NestedJITs CliArgvRuntime (__phpc_cli_*) during full standalone init. Non-user-script full standalone pays that NestedJIT during init — leftover Context NestedJIT vs Runtime ABI drift mints cli_*.1 (#31894 / #32122).
Peer #34822 already dropped CliArgv from ensureMinimalUserStandaloneBodies (thin user-script). Call sites already ensure before lookup:
Context::compileToFile thin path (CliArgvRuntime::ensureStandaloneBodies before __phpc_cli_store_argv)
CliArgvGlobalInit::emitRefreshAfterStoreArgv / JitGetopt
ensureBootstrapAotStandaloneBodies keeps bootstrap-aot fixtures linked
Full path should move the ensure to compileToFile for all standalone (not only thin), then drop from ensureFullStandaloneBodies.
php-src reference
PHP implementation target
Repro
./script/aot-smoke.sh # must stay 8/8
./script/phpunit.sh --filter ContextFullStandaloneLazyCliArgv
Done when
Category
bug· php-in-php · Trust / #32122.1mint class · ensureFullStandaloneBodies shrinkProblem
Context::ensureFullStandaloneBodiesstill NestedJITsCliArgvRuntime(__phpc_cli_*) during full standalone init. Non-user-script full standalone pays that NestedJIT during init — leftover Context NestedJIT vs Runtime ABI drift mintscli_*.1(#31894 / #32122).Peer #34822 already dropped CliArgv from
ensureMinimalUserStandaloneBodies(thin user-script). Call sites already ensure before lookup:Context::compileToFilethin path (CliArgvRuntime::ensureStandaloneBodiesbefore__phpc_cli_store_argv)CliArgvGlobalInit::emitRefreshAfterStoreArgv/JitGetoptensureBootstrapAotStandaloneBodieskeeps bootstrap-aot fixtures linkedFull path should move the ensure to
compileToFilefor all standalone (not only thin), then drop fromensureFullStandaloneBodies.php-src reference
ext/standard/basic_functions.c— CLI$argc/$argvSAPIPHP implementation target
lib/JIT/Context.phpensureFullStandaloneBodies— removeCliArgvRuntime::ensureStandaloneBodieslib/JIT/Context.phpcompileToFile—ensureStandaloneBodiesfor everyLOAD_TYPE_STANDALONEbeforemainemits__phpc_cli_store_argvensureBootstrapAotStandaloneBodieslink for bootstrap-aot fixturesContextMinimalStandaloneLazyCliArgvRuntimeShrinkTest/ php-in-php: drop Context ensureFullStandaloneBodies always-on StringGetenv/StringGetenvAll — lazy at JitEnv (ext/standard/basic_functions.c) #35127Repro
./script/aot-smoke.sh # must stay 8/8 ./script/phpunit.sh --filter ContextFullStandaloneLazyCliArgvDone when
ensureFullStandaloneBodiesdoes not callCliArgvRuntime::ensureStandaloneBodies/ensureLinkedcompileToFileensures CliArgv for all standalone before__phpc_cli_store_argv./script/aot-smoke.sh→ 8/8runtime/*.c