Fix: AOT get_headers insert-block restore (#27317) - #27464
Merged
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
GetHeadersRuntime::implementnow saves/restores the caller LLVM insert block after emitting__compiler_get_headers(same pattern as Inet/Ftok Regression: AOT ip2long()/long2ip() compile fails — Current basic block has no parent function (ext/standard/basic_functions.c) #27088), so mid-scriptBasicBlockHelper::appendno longer throwsCurrent basic block has no parent function.@get_headers(...) === false.php-src reference
ext/standard/head.c—PHP_FUNCTION(get_headers)lib/JIT/Builtin/GetHeadersRuntime.php(php-in-PHP bridge; no new C)Test plan
true)GetHeadersJitRuntimeShrinkTest|GetHeadersRuntimeStandaloneTestget_headers_refused_connectionVerification transcript
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