Category
php-in-php · php-src-strict
Problem
Session lifecycle builtins (session_start, session_write_close, session_destroy, status transitions) have VM logic in ext/standard/VmSession.php and helpers, but JIT/AOT still link lib/JIT/Builtin/SessionLifecycleRuntime.php (~461 lines) with LLVM globals (sg_SESSION, hex session id generation, write-close paths).
Related migrations #9411 (session_gc), #9440 (session_encode/decode), #9376 (session_name headers) must share one PHP session SSOT — lifecycle LLVM is the largest remaining non-encode chunk.
php-src reference
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
php bin/vm.php -r "
session_start();
\$_SESSION[\"k\"] = 1;
session_write_close();
var_dump(session_status());
session_start();
var_dump(\$_SESSION[\"k\"]);
session_destroy();
var_dump(session_status());
"'
wc -l lib/JIT/Builtin/SessionLifecycleRuntime.php
Scope (this repo)
| Path |
Work |
lib/JIT/Builtin/SessionLifecycleRuntime.php |
Shrink to trampoline; delete LLVM session state machine |
ext/standard/session_start.php, session_destroy.php, … |
JIT lower() → VmSession |
ext/standard/VmSession.php |
SSOT lifecycle + #9376 header guards |
| Tests |
test/compliance/cases/stdlib/session_*.phpt JIT |
Done when
Related
Category
php-in-php· php-src-strictProblem
Session lifecycle builtins (
session_start,session_write_close,session_destroy, status transitions) have VM logic inext/standard/VmSession.phpand helpers, but JIT/AOT still linklib/JIT/Builtin/SessionLifecycleRuntime.php(~461 lines) with LLVM globals (sg_SESSION, hex session id generation, write-close paths).Related migrations #9411 (
session_gc), #9440 (session_encode/decode), #9376 (session_nameheaders) must share one PHP session SSOT — lifecycle LLVM is the largest remaining non-encode chunk.php-src reference
ext/session/session.c—php_session_start,php_session_destroy,php_session_write_closeext/session/mod_files.c— default save handler (subset ok for compiler)Repro
Scope (this repo)
lib/JIT/Builtin/SessionLifecycleRuntime.phpext/standard/session_start.php,session_destroy.php, …lower()→ VmSessionext/standard/VmSession.phptest/compliance/cases/stdlib/session_*.phptJITDone when
VmSession— nosg_SESSIONLLVM globalsbin/vm.phpandbin/jit.phpSessionLifecycleRuntime.phpRelated