Fix session_start AOT abort + false bool return (#21892) - #21899
Merged
Merged
Conversation
NestedJIT mis-lowers VmSession::createId; generate ids in SessionCreateIdJitHelper. Value-box bool copy used __value__readLong (no NATIVE_BOOL arm → always 0). Co-authored-by: Cursor <cursoragent@cursor.com>
This was referenced Jul 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VmSession::createId()fromSessionCreateIdJitHelper— inline php-srcbin_to_readable/random_bytes(sid_length=26).__value__readLonghas noTYPE_NATIVE_BOOLarm and returned 0, so$r = session_start()was always false on AOT after a successful start. Read the bool payload byte instead.session_startLLVM path returns true (php-src);emitWriteBooluses__value__writeBool.__string__*) for domain/samesite.Still blocked for #1974 deploy smoke
SessionsWebAotExecuteTeststill fails: thin AOT keeps__phpc_setcookie_addas a no-op link stub. Upgrading stubs to NestedJITPendingHeadersJitHelpercurrently segfaults inaddHeaderwhen invoked from session (follow-up issue).Test plan
$r=session_start(); echo $r?"T":"F"→T(was abort /F)TSessionCreateIdRuntimeShrinkTest+ session shrink testsSessionsWebAotExecuteTest— still fails (Set-Cookie stub); tracked for follow-upVerification
php-src:
ext/session/session.c(create id / start). PHP-in-PHP:ext/standard/SessionCreateIdJitHelper.php,lib/JIT/JitValueBox.php.Made with Cursor