Skip to content

Fix session_start AOT abort + false bool return (#21892) - #21899

Merged
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-21892-session-create-id-aot
Jul 21, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-21892-session-create-id-aot

Conversation

@PurHur

@PurHur PurHur commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

Still blocked for #1974 deploy smoke

SessionsWebAotExecuteTest still fails: thin AOT keeps __phpc_setcookie_add as a no-op link stub. Upgrading stubs to NestedJIT PendingHeadersJitHelper currently segfaults in addHeader when invoked from session (follow-up issue).

Test plan

  • AOT: $r=session_start(); echo $r?"T":"F"T (was abort / F)
  • VM same → T
  • SessionCreateIdRuntimeShrinkTest + session shrink tests
  • SessionsWebAotExecuteTest — still fails (Set-Cookie stub); tracked for follow-up

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
printf "%s\n" "<?php" "\$r=session_start();" "echo \$r?\"T\":\"F\";" "echo \"\\n\";" > /tmp/sst.php
PHP_COMPILER_LLVM_ASSERT=1 php bin/compile.php -o /tmp/sst.bin /tmp/sst.php
/tmp/sst.bin
php -d memory_limit=1536M vendor/bin/phpunit --filter SessionCreateIdRuntimeShrinkTest
'

php-src: ext/session/session.c (create id / start). PHP-in-PHP: ext/standard/SessionCreateIdJitHelper.php, lib/JIT/JitValueBox.php.

Made with Cursor

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Regression: session_start() AOT aborts in SessionCreateIdJitHelper::randomIdString — nested VmSession::createId (#1974)

1 participant