Category
Foundation · php-in-php · runtime-shrink · cold-build / #32122 class
Problem
Type::initialize still eagerly SessionStorageGlobals::ensureGlobals on every full-load path after the CallArgv batch (#34550).
Always-on LLVM module globals (__phpc_session_id_storage, __phpc_session_name_storage, __phpc_session_active, …) on every full load for scripts that never touch session_* is leftover Type::initialize debt after the #32122 .1-mint shrink wave.
Call sites already ensure before use:
ext/standard/JitSessionStorageKernel.php / JitSessionLifecycleKernel.php / JitSessionStatus.php / JitSessionCacheExpire.php
lib/JIT/Builtin/SessionId.php / SessionName.php / SessionModuleName.php
SessionGcRuntime / SessionEncodeRuntime / SessionCreateIdRuntime
SessionStorageGlobals::emitCallEnsureDefaults / implementEnsureDefaults
php-src reference
PHP implementation target
Repro
./script/aot-smoke.sh
./script/docker-exec.sh -- bash -lc 'script/cold-build-check.sh'
./script/phpunit.sh --filter 'TypeDeadTypeInitializeLazySessionStorageGlobals|SessionStorageGlobalsStandalone|SessionStorageRuntimeShrink'
./script/docker-exec.sh -- bash -lc 'printf "%s\n" "<?php session_start(); echo session_id() !== \"\" ? \"ok\" : \"fail\", PHP_EOL;" >/tmp/ss.php && php bin/compile.php -o /tmp/ss.bin /tmp/ss.php && /tmp/ss.bin'
Done when
Parent
Category
Foundation· php-in-php · runtime-shrink · cold-build / #32122 classProblem
Type::initializestill eagerlySessionStorageGlobals::ensureGlobalson every full-load path after the CallArgv batch (#34550).Always-on LLVM module globals (
__phpc_session_id_storage,__phpc_session_name_storage,__phpc_session_active, …) on every full load for scripts that never touchsession_*is leftover Type::initialize debt after the #32122.1-mint shrink wave.Call sites already ensure before use:
ext/standard/JitSessionStorageKernel.php/JitSessionLifecycleKernel.php/JitSessionStatus.php/JitSessionCacheExpire.phplib/JIT/Builtin/SessionId.php/SessionName.php/SessionModuleName.phpSessionGcRuntime/SessionEncodeRuntime/SessionCreateIdRuntimeSessionStorageGlobals::emitCallEnsureDefaults/implementEnsureDefaultsphp-src reference
ext/session/session.c—PS(id),PS(session_name), session module statePHP implementation target
lib/JIT/Builtin/Type.php— removeSessionStorageGlobals::ensureGlobalsfrominitialize()TypeDeadTypeInitializeLazySessionStorageGlobalsRuntimeShrinkTest(peer php-in-php: drop Type::initialize always-on CallArgv::implement — lazy ensureGlobal at emitStore/load (peer #34534) #34550)ensureGlobals staysruntime/*.c/lib/AOT/runtime/*.cRepro
Done when
Type::initializedoes not callSessionStorageGlobals::ensureGlobalssession_start/session_idstill work under AOT (lazy ensureGlobals)runtime/*.cParent