Skip to content

[SourceKit] Disable cancellation of in-flight non-completion requests #42166

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
merged 1 commit into from
Apr 5, 2022

Conversation

bnbarham
Copy link
Contributor

@bnbarham bnbarham commented Apr 4, 2022

We need to run SILGen for diagnostics (to actually get all diagnostics).
All non-completion requests share an AST and thus they too run SILGen.
Any lazy typechecking run in SILGen assumes that it succeeds.

Cancellation can cause typechecking to fail here though, since we simply
check the flag and error if it's set. This unfortunately has the ability
to cause any any number of crashes since various invariants in SILGen
are then broken.

Disable cancellation of in-flight non-completion requests for now until
we have a proper fix in place.

Resolves rdar://91251017.

@bnbarham bnbarham requested a review from ahoppen April 4, 2022 19:10
@bnbarham
Copy link
Contributor Author

bnbarham commented Apr 4, 2022

@swift-ci please test

We need to run SILGen for diagnostics (to actually get all diagnostics).
All non-completion requests share an AST and thus they too run SILGen.
Any lazy typechecking run in SILGen assumes that it succeeds.

Cancellation can cause typechecking to fail here though, since we simply
check the flag and error if it's set. This unfortunately has the ability
to cause any any number of crashes since various invariants in SILGen
are then broken.

Disable cancellation of in-flight non-completion requests for now until
we have a proper fix in place.

Resolves rdar://91251017.
@bnbarham bnbarham force-pushed the disable-cancellation branch from f5ffda8 to 7cd4937 Compare April 4, 2022 20:14
@bnbarham
Copy link
Contributor Author

bnbarham commented Apr 4, 2022

@swift-ci please test

@bnbarham bnbarham merged commit 25232e8 into swiftlang:main Apr 5, 2022
@bnbarham bnbarham deleted the disable-cancellation branch April 5, 2022 15:52
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.

2 participants