Skip to content

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

Description

@PurHur

Category

stdlib · php-src-strict · blocks #1974 deploy smoke

Problem

After #21870, examples/005-SessionsWeb links but AOT execute aborts (exit 134) inside nested-JIT SessionCreateIdJitHelper::randomIdString. Binary strings show return-type errors attributing phpcompiler\ext\standard\vmsession where a string is required — nested static VmSession::createId() is mis-lowered.

Repro Expected AOT (post-#21870)
session_start(); echo "ok\n"; prints ok SIGABRT in randomIdString
test005SessionsWebAotLink green green
SessionsWebAotExecuteTest green fail exit 134

php-src reference

PHP implementation target

  • ext/standard/SessionCreateIdJitHelper.php — avoid nested VmSession::createId(); use random_bytes + local bin_to_readable (or fix NestedJIT static call return)
  • lib/JIT/Builtin/SessionCreateIdRuntime.php — bridge remains

Repro

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
printf "%s\n" "<?php" "session_start();" "echo \"ok\\n\";" > /tmp/ss.php
php bin/compile.php -o /tmp/ss.bin /tmp/ss.php
PHP_COMPILER_SESSION_DIR=$(mktemp -d) /tmp/ss.bin; echo exit:$?
'

Done when

  • Minimal AOT session_start() prints and exits 0
  • SessionsWebAotExecuteTest green
  • php-src-strict; no new C runtime

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:vmVirtual machinebugSomething isn't workingimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions