Skip to content

AOT: fix request_parse_body compile/link (#5965)#17316

Open
PurHur wants to merge 1 commit into
masterfrom
agent/issue-5965-request-parse-body-aot
Open

AOT: fix request_parse_body compile/link (#5965)#17316
PurHur wants to merge 1 commit into
masterfrom
agent/issue-5965-request-parse-body-aot

Conversation

@PurHur

@PurHur PurHur commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix LLVM dominance for list-unpack-style $post = $pair[0] after request_parse_body() by promoting assign targets to entry allocas
  • Link standalone putenv() through EnvLocalRuntime (__compiler_env_register_putenv) without nested-JIT HashTable::update breakage
  • Route GetenvJitHelper hashtable population through phpc_native_ht_set_string_key (php-in-PHP, no C runtime growth)
  • Preserve LLVM insert blocks across RequestParseBodyRuntime / EnvLocalRuntime nested helper emits

Verification

source script/php-env.sh
export PHP_COMPILER_PROFILE=8.4
php bin/compile.php -o /tmp/rpb test/fixtures/aot/cases/request_parse_body_urlencoded.phpt
echo compile:$?   # 0 (link OK)
/tmp/rpb          # segfault exit 139 at c:main_before_php — runtime follow-up
vendor/bin/phpunit test/aot/AotTest.php --filter request_parse
# compile/link passes; run assertions fail on segfault (exit 139/134)

Closes #5965 when runtime segfault is fixed.

Made with Cursor

- Link __compiler_env_register_putenv via EnvLocalRuntime during standalone putenv JIT
- Route GetenvJitHelper hashtable fills through phpc_native_ht_set_string_key (nested-JIT safe)
- Promote list-unpack assign targets to entry allocas for LLVM dominance (#5965)
- Preserve insert blocks across RequestParseBodyRuntime / EnvLocalRuntime nested emits

Compile + link green for urlencoded/multipart fixtures; AOT runtime still segfaults at
c:main_before_php (follow-up).

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur

PurHur commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Maintainer triage 2026-07-08: compile/link green per PR body but AOT runtime still segfaults at c:main_before_php — not merge-ready until execute repro passes. Re-run bootstrap not required (stdlib/AOT path only).

@PurHur

PurHur commented Jul 8, 2026

Copy link
Copy Markdown
Owner Author

Maintainer triage 2026-07-08: compile/link green per PR body but runtime segfault remains — hold merge until AOT execute passes issue repro.

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: request_parse_body() — PHP 8.4 HTTP body parser without superglobals (ext/standard/http.c)

1 participant