Category
php-in-php · runtime-shrink (#1492, peer #32651 / #32287 / re-#32122)
Problem
Builtin\Type::register() still addFunctions empty always-on shells for __compiler_getenv and __compiler_getenv_all on every JIT/AOT module. Runtime owners already declare the same prototypes module-locally with getNamedFunction first:
StringGetenv (__compiler_getenv) — GetenvLookupJitHelper / NestedJIT libc getenv(3)
StringGetenvAll (__compiler_getenv_all) — EnvironMirrorRuntime
A leftover Type addFunction vs Runtime ABI drift mints getenv.1 with no body (Module.php:180 / ld undefined name.1) — the #31894 / #32122 class. Empty Type decls were also mistaken for completed bodies and left U __compiler_getenv at argv-driver link (#26756).
| Path |
Today |
Target |
| getenv body |
StringGetenv / JitEnv::getenv |
unchanged |
| getenv_all body |
StringGetenvAll / JitEnv::getenvAll |
unchanged |
Type.php |
always-on empty shells |
drop both rows |
| NestedJIT consumers |
already ensureLinked before lookup |
keep + cite this issue |
| User-script getenv()/putenv() |
GetenvLookupJitHelper / PutenvJitHelper |
unchanged |
php-src reference
PHP implementation target
lib/JIT/Builtin/Type.php — remove always-on __compiler_getenv / __compiler_getenv_all
ext/standard/JitEnv.php — already StringGetenv::ensureLinked / StringGetenvAll::ensureLinked before lookup
lib/JIT/Builtin/StringGetenv.php / StringGetenvAll.php — keep getNamedFunction-first owners
Repro
./script/docker-exec.sh -- bash -lc './script/aot-smoke.sh'
./script/docker-exec.sh -- bash -lc './script/cold-build-check.sh'
Done when
Category
php-in-php· runtime-shrink (#1492, peer #32651 / #32287 / re-#32122)Problem
Builtin\Type::register()stilladdFunctions empty always-on shells for__compiler_getenvand__compiler_getenv_allon every JIT/AOT module. Runtime owners already declare the same prototypes module-locally withgetNamedFunctionfirst:StringGetenv(__compiler_getenv) — GetenvLookupJitHelper / NestedJIT libc getenv(3)StringGetenvAll(__compiler_getenv_all) — EnvironMirrorRuntimeA leftover Type
addFunctionvs Runtime ABI drift mintsgetenv.1with no body (Module.php:180 / ld undefinedname.1) — the #31894 / #32122 class. Empty Type decls were also mistaken for completed bodies and leftU __compiler_getenvat argv-driver link (#26756).StringGetenv/JitEnv::getenvStringGetenvAll/JitEnv::getenvAllType.phpensureLinkedbefore lookupphp-src reference
ext/standard/basic_functions.c—zif_getenv/zif_putenvPHP implementation target
lib/JIT/Builtin/Type.php— remove always-on__compiler_getenv/__compiler_getenv_allext/standard/JitEnv.php— alreadyStringGetenv::ensureLinked/StringGetenvAll::ensureLinkedbefore lookuplib/JIT/Builtin/StringGetenv.php/StringGetenvAll.php— keep getNamedFunction-first ownersRepro
Done when
Type.phpdoes notaddFunction/registerFunction__compiler_getenvor__compiler_getenv_allStringGetenv/StringGetenvAllstill own the ABI (getNamedFunction first)aot-smoke.shstays 8/8cold-build-check.shokruntime/*.c