Skip to content

🍒[5.5][TaskLocals] dont crash checking for taskgroup when in no task #37682

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 28, 2021

Cherry pick of #37681


Explanation:
Fixes crash when a task local value is attempted to be bound from a context that has no Task available.

The underlying implementation is correct and works fine, but we added an additional check recently and missed that the test still had a task available.

Scope: Binding a task-local value in purely synchronous code.

Main Branch PR: #37681

Resolves: rdar://78587643

Risk: Low

Reviewed By: @DougGregor

Testing: Test adjusted to cover the specific case, previously it accidentally still had a task available due to the async main function.

@ktoso ktoso requested a review from a team as a code owner May 28, 2021 01:28
@ktoso ktoso changed the title [TaskLocals] dont crash checking for taskgroup when in no task [5.5][TaskLocals] dont crash checking for taskgroup when in no task May 28, 2021
@ktoso ktoso changed the title [5.5][TaskLocals] dont crash checking for taskgroup when in no task 🍒[5.5][TaskLocals] dont crash checking for taskgroup when in no task May 28, 2021
@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2021

@swift-ci please smoke test

@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2021

resolves rdar://78587643

@ktoso ktoso added the r5.5 label May 28, 2021
@ktoso ktoso requested review from airspeedswift and DougGregor May 28, 2021 01:59
@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2021

@swift-ci please nominate

@ktoso
Copy link
Contributor Author

ktoso commented May 28, 2021

@swift-ci please test

@DougGregor DougGregor merged commit 760c9d9 into swiftlang:release/5.5 May 28, 2021
@ktoso ktoso deleted the pick-wip-task-local-dont-crash-local branch May 29, 2021 00:45
@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
🍒 release cherry pick Flag: Release branch cherry picks swift 5.5
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants