Skip to content

[6.2] SILGen: Have emitSemanticStore cast off concurrency annotations. #83142

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

jckarter
Copy link
Contributor

@jckarter jckarter commented Jul 17, 2025

Explanation: Fixes a compiler crash that can be induced when existing code compiles against new versions of Objective-C SDKs that adopt Swift concurrency annotations.

Scope: Fixes a regression where the compiler crashes on code that compiled with a previous version of an Objective-C SDK after upgrading the SDK.

Issue: Fixes rdar://154520999

Original PR: #83107

Risk: Low. Modifies SILGen to be more forgiving of concurrency-related type mismatches in generated SIL.

Testing: Test case from bug report, Swift CI

Reviewer: @xedin

If a function is being semantically treated as having different concurrency
annotations because of a `@preconcurrency` import or language mode setting,
then SILGen may try to store an argument or result for a call using a value
that differs only in concurrency annotations, which can be safely bitcast
away.

Fixes rdar://154520999
@jckarter jckarter requested a review from a team as a code owner July 17, 2025 18:36
@jckarter
Copy link
Contributor Author

@swift-ci Please test

Copy link
Contributor

@tbkka tbkka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A nice targeted fix.

@jckarter jckarter merged commit 6516d94 into swiftlang:release/6.2 Jul 18, 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.

2 participants