Skip to content

[6.1][IRGen] Map result to native representation in emitAsyncReturn #80350

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
merged 1 commit into from
Mar 28, 2025

Conversation

drexin
Copy link
Contributor

@drexin drexin commented Mar 27, 2025

  • Explanation: When an async typed throwing function had a result type that combined multiple fields into a single register, we created invalid IR, that could lead to compiler crashes or in some cases even miscompiles. With this fix we are mapping the result to the native representation before mapping it to the combined result type.
  • Scope: IRGen for asynchronous return of typed throwing functions
  • Issues: rdar://147872231
  • Original PRs: [IRGen] Map result to native representation in emitAsyncReturn #80287
  • Risk: Low. This change aligns the behavior with synchronous returns and is very contained.
  • Testing: Added regression test and existing tests still pass.
  • Reviewers: @aschwaighofer

rdar://147872231

When an async typed throwing function had a result type that combined multiple fields into a single register, we created invalid IR, that could lead to compiler crashes or in some cases even miscompiles. With this fix we are mapping the result to the native representation before mapping it to the combined result type.
@drexin drexin added 🍒 release cherry pick Flag: Release branch cherry picks swift 6.1 labels Mar 27, 2025
@drexin drexin requested a review from a team as a code owner March 27, 2025 20:09
@drexin
Copy link
Contributor Author

drexin commented Mar 27, 2025

@swift-ci test

@drexin drexin merged commit aa6f1d5 into swiftlang:release/6.1 Mar 28, 2025
5 checks passed
shahmishal added a commit that referenced this pull request Mar 30, 2025
This reverts commit aa6f1d5, reversing
changes made to 0414cb2.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 6.1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants