Skip to content

[6.0][Concurrency] Further prevent crashes in legacy mode of isSameExecutor concurrency #73839

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

ktoso
Copy link
Contributor

@ktoso ktoso commented May 23, 2024

Description: This cleans up interactions with the "legacy mode" where we're not allowed to crash in the isCurrentExecutor impl.

Scope/Impact: Dynamic actor isolation checks are inserted by Swift 6. Without this patch they would crash existing applications without them recompiling. This patch corrects logic to only start doing so when recompiled against new SDK. It also corrects some logic that would have prevented checkIsolated from being invoked in some cases.

Risk: Medium, the change is fleshing out logic in swift_task_isCurrentExecutorImpl interactions between flags. However we took great lengths to verify this logic is now correct.
Testing: Verified manually; Improved tests to now run in swift 6 AND legacy mode.
Reviewed by: @hborla @mikeash

Original PR: #73813
Radar: rdar://127400013

@ktoso ktoso requested a review from a team as a code owner May 23, 2024 08:09
@ktoso ktoso changed the title [Concurrency] Fix missing return in legacy isSameExecutor mode detection [6.0][Concurrency] Fix missing return in legacy isSameExecutor mode detection May 23, 2024
@ktoso ktoso requested review from xedin, mikeash and hborla May 23, 2024 08:10
@ktoso
Copy link
Contributor Author

ktoso commented May 23, 2024

@swift-ci please test

@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 6.0 labels May 23, 2024
@ktoso ktoso changed the title [6.0][Concurrency] Fix missing return in legacy isSameExecutor mode detection [6.0][Concurrency] Further prevent crashes in legacy mode of isSameExecutor concurrency May 24, 2024
@ktoso ktoso force-pushed the pick-6-pick-concurrency-isCurrent-more-fixes branch from a41d2a8 to 01d0958 Compare May 28, 2024 03:20
@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2024

@swift-ci please test

@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2024

Last commit here is unbreaking embedded, pick from: #73934

@ktoso ktoso force-pushed the pick-6-pick-concurrency-isCurrent-more-fixes branch from 772fc1c to 6b2e9b1 Compare May 28, 2024 09:50
@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2024

@swift-ci please test

@ktoso ktoso force-pushed the pick-6-pick-concurrency-isCurrent-more-fixes branch from 275dff8 to 135213e Compare May 29, 2024 06:04
@ktoso
Copy link
Contributor Author

ktoso commented May 29, 2024

Picked a test adjustment for full test suite #73969

@swift-ci please test

@ktoso ktoso enabled auto-merge May 29, 2024 06:06
@ktoso ktoso merged commit 13b4456 into swiftlang:release/6.0 May 29, 2024
5 checks passed
@ktoso ktoso deleted the pick-6-pick-concurrency-isCurrent-more-fixes branch May 29, 2024 14:40
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 6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants