Skip to content

Stdlib: thin AOT session wire multi-key + int/bool/null (#21922) - #21944

Merged
PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-21922-session-wire-multikey
Jul 21, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/advanced-stdlib-21922-session-wire-multikey

Conversation

@PurHur

@PurHur PurHur commented Jul 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • Loop emitSessionWireLoadFromPath over concatenated php-src session wire pairs (s: / i: / b: / N;)
  • Emit int/bool/null on save (%.*s|i:%lld; / b:%d; / N;) in addition to strings
  • Unit guard SessionWireMultiKeyTest + keep SessionsWebAotExecuteTest green

Closes #21922

php-src: ext/session/session.c / mod_php.c — PHP impl: ext/standard/JitSessionStorageKernel.php

Verification

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh
export PHP_COMPILER_HELPER_RUNTIME_O=1
php -d memory_limit=512M vendor/bin/phpunit --filter "SessionWireMultiKeyTest|SessionsWebAotExecuteTest"
'
# OK (3 tests, 30 assertions)

# Issue repro (multi-key + int/bool wire + string round-trip)
wire: a|s:3:"one";b|s:3:"two";n|i:3;t|b:1;
a=one
b=two
n_isset=1
t_isset=1

Note: reading int/bool session values (cast/echo) still hits a pre-existing thin-AOT HT scalar read crash; wire persist + isset + multi-string round-trip are green. Null assign into $_SESSION still does not insert an HT entry under thin AOT (VM path does).

Test plan

  • Multi-string AOT round-trip
  • int/bool on session wire file
  • SessionsWebAotExecuteTest
  • SessionWireMultiKeyTest

Made with Cursor

Loop LLVM session load over concatenated php-src wire pairs and emit
i:/b:/N; on save so multi-string round-trips and scalar types persist.

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.

Stdlib: thin AOT session wire load/save only handles first string pair — multi-key + int/bool/null (ext/session)

1 participant