Skip to content

Fix: AOT get_headers insert-block restore (#27317) - #27464

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-27317-aot-get-headers
Aug 3, 2026
Merged

PurHur merged 1 commit into
masterfrom
agent/issue-27317-aot-get-headers

Conversation

@PurHur

@PurHur PurHur commented Aug 3, 2026

Copy link
Copy Markdown
Owner

Summary

php-src reference

  • ext/standard/head.cPHP_FUNCTION(get_headers)
  • PHP fix: lib/JIT/Builtin/GetHeadersRuntime.php (php-in-PHP bridge; no new C)

Test plan

  • Issue repro AOT compile + run
  • VM/JIT unchanged (true)
  • Unit: GetHeadersJitRuntimeShrinkTest|GetHeadersRuntimeStandaloneTest
  • AOT fixture: get_headers_refused_connection

Verification transcript

./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/vm.php test/repro/maintainer_gap_aot_get_headers.php'
# true
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/jit.php test/repro/maintainer_gap_aot_get_headers.php'
# true
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php bin/compile.php -o build/get_headers_aot test/repro/maintainer_gap_aot_get_headers.php && build/get_headers_aot'
# true (COMPILE_EXIT:0 RUN:0)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php -d memory_limit=1536M vendor/bin/phpunit --filter "GetHeadersJitRuntimeShrinkTest|GetHeadersRuntimeStandaloneTest"'
# OK (6 tests, 19 assertions)
./script/docker-exec.sh -- bash -lc 'source script/php-env.sh && php -d memory_limit=1536M vendor/bin/phpunit --group aot --filter get_headers_refused_connection'
# OK (1 test, 5 assertions)

Not covered this PR: full ci-fast / north-star5-verify-fast (master already red on helper-runtime prelink + gen-0 manifest mismatch — noted on #10533).

Made with Cursor

clearInsertionPosition after linking __compiler_get_headers orphaned the
caller CFG (peer #27088), so BasicBlockHelper::append failed mid-emit.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit ffb9099 into master Aug 3, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-27317-aot-get-headers branch August 3, 2026 21:34
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: AOT get_headers() compile fails — basic block has no parent (ext/standard/head.c)

1 participant