Skip to content

[rbi] Simplify some logic that got confused so that passing an actor isolated value to a callee that is isolated ot the same actor is not considered a send. #80911

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gottesmm
Copy link
Contributor

The logic here got confused over time. This simplifies the logic and ensures that we do not send a value if it is in the same isolation domain as the callee.

The one interesting side effect of this is that in a few tests, due to the logic being confused, we were emitting use-after-send errors for global actor isolated values that were passed to a function that was global actor isolated to the same actor and then used later locally. The error was sending 'X'-isolated a to 'X'-isolated function causes race against nonisolated local uses. In truth, this error is misleading and the only error that we should be emitting in such a case is the error about moving an isolated value into a non-isolated context (which we already emit).

rdar://132932382

…isolated value to a callee that is isolated ot the same actor is not considered a send.

The logic here got confused over time. This simplifies the logic and ensures
that we do not send a value if it is in the same isolation domain as the callee.

The one interesting side effect of this is that in a few tests, due to the logic
being confused, we were emitting use-after-send errors for global actor isolated
values that were passed to a function that was global actor isolated to the same
actor and then used later locally. The error was sending 'X'-isolated a to
'X'-isolated function causes race against nonisolated local uses. In truth, this
error is misleading and the only error that we should be emitting in such a case
is the error about moving an isolated value into a non-isolated context (which
we already emit).

rdar://132932382
@gottesmm
Copy link
Contributor Author

@swift-ci smoke test

@gottesmm
Copy link
Contributor Author

@swift-ci smoke test linux platform

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.

1 participant