Category
stdlib · php-src-strict · blocks #1974 SessionsWeb AOT execute / deploy smoke
Problem
Thin standalone AOT fills __phpc_setcookie_add / pending-header ABI with no-op *_link_stub bodies (PendingHeadersJitBridge::fillThinAotLinkStubs). session_start() → phpc_session_emit_setcookie calls the stub → no Set-Cookie: PHPSESSID=….
Upgrading stubs to NestedJIT PendingHeadersJitHelper (clear *_link_stub + implement, peer StreamIoRuntime defer-stub upgrade) currently segfaults in PendingHeadersJitHelper::addHeader when reached from session (gdb: addsetcookie → addheader). Bare setcookie() still links the stub (1-byte ret) so it does not exercise the NestedJIT path.
After #21899, session_start() AOT returns true and no longer aborts; cookie emission is the remaining execute gate.
Done when
Repro
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
printf "%s\n" "<?php" "session_start();" "echo \"ok\\n\";" > /tmp/s.php
php bin/compile.php -o /tmp/s.bin /tmp/s.php
GATEWAY_INTERFACE=CGI/1.1 REQUEST_METHOD=GET /tmp/s.bin
nm -S /tmp/s.bin | grep setcookie_add # expect real bridge, not 1-byte stub
'
Refs
Category
stdlib· php-src-strict · blocks #1974 SessionsWeb AOT execute / deploy smokeProblem
Thin standalone AOT fills
__phpc_setcookie_add/ pending-header ABI with no-op*_link_stubbodies (PendingHeadersJitBridge::fillThinAotLinkStubs).session_start()→phpc_session_emit_setcookiecalls the stub → noSet-Cookie: PHPSESSID=….Upgrading stubs to NestedJIT
PendingHeadersJitHelper(clear*_link_stub+implement, peer StreamIoRuntime defer-stub upgrade) currently segfaults inPendingHeadersJitHelper::addHeaderwhen reached from session (gdb: addsetcookie → addheader). Baresetcookie()still links the stub (1-byteret) so it does not exercise the NestedJIT path.After #21899,
session_start()AOT returns true and no longer aborts; cookie emission is the remaining execute gate.Done when
session_start()emitsSet-Cookie: PHPSESSID=…under CGI env (GATEWAY_INTERFACE/REQUEST_METHOD)SessionsWebAotExecuteTestgreenRepro
Refs
PendingHeadersJitBridge·JitSessionStorageKernel::implementEmitSetcookieBridgeext/session/session.c,ext/standard/head.c