Skip to content

[5.5] fix SILGen bug for cross-module actor let accesses #40100

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

Closed

Conversation

kavon
Copy link
Member

@kavon kavon commented Nov 8, 2021

Rationale: When accessing an isolated let-bound property of an actor defined in another module, the compiler would crash.
Risk: Low
Risk Detail: This change is very small focused on avoiding an unnecessary compiler crash.
Reward: Medium
Reward Details: Without this fix, programs that import an actor from another module and try to access its isolated let-bound properties would trigger a compiler crash. Actors within the same module, or those marked nonisolated, already work fine.
Original PR: #40097
Issue: rdar://81812013
Code Reviewed By: Doug Gregor
Testing Details: Regression test is included.

When trying to access a let-bound property of an actor across
a moudule boundary, the operation should be treated as async.
But, upon reaching SILGen, the compiler would crash when trying
to emit the needed hop, because the base of the element reference
was missing. This commit fixes that and adds regression coverage.

resolves rdar://81812013
@kavon kavon requested a review from a team as a code owner November 8, 2021 22:57
@kavon kavon changed the title [5.5] cross module actor let silgen [5.5] fix SILGen bug for cross-module actor let accesses Nov 8, 2021
@kavon kavon self-assigned this Nov 8, 2021
@kavon kavon added concurrency Feature: umbrella label for concurrency language features r5.5 labels Nov 8, 2021
@kavon
Copy link
Member Author

kavon commented Nov 8, 2021

@swift-ci please test

@kavon
Copy link
Member Author

kavon commented Nov 9, 2021

@swift-ci please nominate

@kavon kavon closed this Nov 19, 2021
@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
concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants