Skip to content

[SourceKit] Verify the stdlib is loaded before creating an AST #36797

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

Conversation

ahoppen
Copy link
Member

@ahoppen ahoppen commented Apr 7, 2021

We have seen a couple of crashes that look like they are being caused by sourcekitd being unable to load the Swift stdlib. Emit a proper error message explaining the issue instead of crashing.

This change assumes that all sourcekitd requests that create an AST require the stdlib. IMHO this is a reasonable assumption.

Fixes rdar://75740572 by catching the crash in the new check.

We have seen a couple of crashes that look like they are being caused by `sourcekitd` being unable to load the Swift stdlib. Emit a proper error message explaining the issue instead of crashing.

This change assumes that all sourcekitd requests that create an AST require the stdlib. IMHO this is a reasonable assumption.

Fixes rdar://75740572 by catching the crash in the new check.
@ahoppen ahoppen requested a review from akyrtzi April 7, 2021 12:26
@ahoppen
Copy link
Member Author

ahoppen commented Apr 7, 2021

@swift-ci Please test

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