Skip to content

[SymbolGraph] Check Loc validity before extracting text #33370

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
Aug 10, 2020
Merged

[SymbolGraph] Check Loc validity before extracting text #33370

merged 1 commit into from
Aug 10, 2020

Conversation

bitjammer
Copy link
Contributor

Hit this crash while walking an import protocol ... declaration.
Check loc validity before calling SourceManager::extractText:
there is an assertion at the beginning of this function.

rdar://65258208

Hit this crash while walking an `import protocol ...` declaration.
Check loc validity before calling `SourceManager::extractText`:
there is an assertion at the beginning of this function.

rdar://65258208
@bitjammer bitjammer requested a review from nathawes August 7, 2020 20:53
@bitjammer
Copy link
Contributor Author

@nathawes It looks like you changed this code not too long ago; can you check this please? I hit this while walking to an ImportDecl for an import protocol M.X decl.

Copy link
Contributor

@nathawes nathawes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops... Thanks for the fix! I'll look into why we're not getting a valid location in this case too.

@bitjammer
Copy link
Contributor Author

@swift-ci Please smoke test

@bitjammer
Copy link
Contributor Author

Thank you!

@bitjammer bitjammer merged commit 05c3333 into swiftlang:master Aug 10, 2020
@bitjammer bitjammer deleted the acgarland/rdar-65258208-crash-invalid-loc-extracttext branch August 10, 2020 18:56
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