Skip to content
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

Emit hop_to_executor instructors for foreign async calls. #38768

Merged

Conversation

DougGregor
Copy link
Member

@DougGregor DougGregor commented Aug 5, 2021

Explanation: Fix a miscompile where a call to an Objective-C completion-handler method as async would fail to emit an
appropriate hop_to_executor instruction to hop back to the current executor afterward, meaning that subsequent code would not execute on the correct actor. This could cause data races and crashes.
Scope: Affects new code using Swift's Concurrency model.
Radar/SR Issue: rdar://81468980
Risk: Low.
Reviewed By: Joe Groff
Testing: PR testing and CI on main, including new tests.
Original PR: #38767

Fix a miscompile where a foreign `async` call would fail to emit an
appropriate `hop_to_executor` instruction to hop back to the current
executor afterward, meaning that subsequent code would not execute on
the correct actor.

Fixes rdar://81468980.
@DougGregor DougGregor added the r5.5 label Aug 5, 2021
@DougGregor DougGregor requested a review from a team as a code owner August 5, 2021 20:55
@DougGregor
Copy link
Member Author

@swift-ci please test

@DougGregor
Copy link
Member Author

@swift-ci please nominate

@DougGregor DougGregor merged commit ba16448 into swiftlang:release/5.5 Aug 6, 2021
@DougGregor DougGregor deleted the foreign-async-hop-back-5.5 branch August 6, 2021 17:14
@AnthonyLatsis AnthonyLatsis added 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5 labels Jan 8, 2023
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 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants