Skip to content

🍒[5.9][Concurrency] Handle missing Job type in old SDKs in tryDiagnoseExecutor #65413

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

Conversation

ktoso
Copy link
Contributor

@ktoso ktoso commented Apr 25, 2023

Description: When a new compiler is used with an old SDK, we may not have any Job or ExecutorJob types. The code missed to initialize the local variable as nullptr, and this could be uninitialized when this happened, wrongly entering if (decl) protected code and then crash. This replaces, or complements, #65406 with adding a test that would have triggered the issue -- an SDK that is missing Job and ExecutorJob declarations.

Risk: Low, just initializing a local variable
Review by: @hborla @xedin
Testing: CI testing, added test covering this situation with a mock-sdk
Original PR: #65412
Radar: rdar://108458906

@ktoso ktoso requested a review from a team as a code owner April 25, 2023 06:55
@ktoso ktoso requested review from DougGregor and hborla April 25, 2023 06:55
@ktoso ktoso changed the title [5.9] Pick try diagnose executor must survive missing job type 🍒[5.9] Pick try diagnose executor must survive missing job type Apr 25, 2023
@ktoso
Copy link
Contributor Author

ktoso commented Apr 25, 2023

@swift-ci please test

@ktoso ktoso changed the title 🍒[5.9] Pick try diagnose executor must survive missing job type 🍒[5.9][Concurrency] Handle missing Job type in old SDKs in tryDiagnoseExecutor Apr 25, 2023
@ktoso
Copy link
Contributor Author

ktoso commented Apr 25, 2023

@swift-ci please test and merge

@swift-ci swift-ci merged commit 5182208 into swiftlang:release/5.9 Apr 26, 2023
@ktoso ktoso deleted the pick-tryDiagnoseExecutor-must-survive-missing-job-type branch April 26, 2023 07:29
@ktoso ktoso added concurrency Feature: umbrella label for concurrency language features 🍒 release cherry pick Flag: Release branch cherry picks swift 5.9 labels Apr 26, 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.9
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants