Skip to content

[🍒: 6.2] Fix Bootstrap: UTF8EncoddingError #80936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

etcwilde
Copy link
Contributor

@etcwilde etcwilde commented Apr 20, 2025

🍒#80934

The pass that annotated control-flow positions unreachable after an infinite loop was migrated to pure Swift in PR 79186 (#79186). As a result, the C++-only bootstrap compiler is unable to determine that the code-location is unreachable. Placing a fatalError after the infinite while loop.

Fixes: rdar://149568740
(cherry picked from commit 783c969)

Explanation:

Fixes a regression caught by the bootstrap job. The pass that identifies unreachable code locations using the control-flow-graph was moved to Swift-only, so any code that is required in the bootstrap must explicitly annotate those locations or the code will fail to compile when compiled with the bootstrap compiler.

Risk: Low, the full compiler places an unreachable instruction here at the SIL level under normal circumstances. The bootstrap compiler doesn't have that capability, so we must add one explicitly.

Reviewed By: @xedin

Testing: Locally verified that the bootstrap works after this PR. Standard PR testing passes with this PR. The bootstrapping bot caught the regression.

The pass that annotated control-flow positions unreachable after an
infinite loop was migrated to pure Swift in PR 79186
(swiftlang#79186). As a result, the
C++-only bootstrap compiler is unable to determine that the
code-location is unreachable. Placing a fatalError after the infinite
while loop.

Fixes: rdar://149568740
(cherry picked from commit 783c969)
@etcwilde etcwilde requested review from xedin and milseman April 20, 2025 16:08
@etcwilde etcwilde requested a review from a team as a code owner April 20, 2025 16:08
@etcwilde
Copy link
Contributor Author

@swift-ci please test

@xedin
Copy link
Contributor

xedin commented Apr 21, 2025

@etcwilde please use CCC template i.e. #80924

@etcwilde etcwilde merged commit bf09736 into swiftlang:release/6.2 Apr 21, 2025
5 checks passed
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.

3 participants