-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Sema/SILGen] DynamicActorIsolation: Implement dynamic actor isolation checks for unsafe APIs #71261
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
xedin
merged 10 commits into
swiftlang:main
from
xedin:introduce-thunks-for-runtime-check-func-refs
Feb 2, 2024
Merged
[Sema/SILGen] DynamicActorIsolation: Implement dynamic actor isolation checks for unsafe APIs #71261
xedin
merged 10 commits into
swiftlang:main
from
xedin:introduce-thunks-for-runtime-check-func-refs
Feb 2, 2024
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2bbe594
to
ecfa1da
Compare
@swift-ci please test |
1 similar comment
@swift-ci please test |
ecfa1da
to
bdf8399
Compare
@swift-ci please test |
@swift-ci please build toolchain |
… module For imported modules the version is empty because they don't carry this information.
To be used in situations when a global actor isolation is stripped from a function type in argument positions and could be extended in the future to cover more if needed.
The thunk is a reabstraction thunk with a custom prolog that has a runtime precondition check that makes sure that concurrent environment where the thunk is run matches that of a global actor associated with the thunked type.
…s that require runtime check Passing an isolated function value into an API that doesn't have full static concurrency checking is unsafe and requires runtime checks to make sure that function is always called in the expected context.
…`Module::isConcurrencyChecked` API
397386a
to
53b2d86
Compare
@swift-ci please test |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Passing an actor isolated synchronous function value (either declaration
or a closure) to an API that erases actor isolation and comes from a module
that hasn't adopted Swift version
6
would result in runtime check(implemented via a thunk) that makes sure that the function is called on
the expected executor when
DynamicActorIsolation
flag is enabled.Resolves: rdar://116022277