Skip to content

Guard for null result from ClangModuleUnit::getClangModule(). #17984

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
Jul 16, 2018
Merged

Guard for null result from ClangModuleUnit::getClangModule(). #17984

merged 1 commit into from
Jul 16, 2018

Conversation

rudkx
Copy link
Contributor

@rudkx rudkx commented Jul 16, 2018

The documentation for this method states that this can return null if
the module unit represents [the] imported headers.

We have a crash report on dereferencing the result of this function
farther down, and I suspect it's hitting exactly that
case. Unfortunately we only have a back trace and no test case.

Fixes: rdar://problem/41888568

The documentation for this method states that this can return null if
the module unit represents [the] imported headers.

We have a crash report on dereferencing the result of this function
farther down, and I suspect it's hitting exactly that
case. Unfortunately we only have a back trace and no test case.

Fixes: rdar://problem/41888568
@rudkx
Copy link
Contributor Author

rudkx commented Jul 16, 2018

@swift-ci Please smoke test

@rudkx rudkx requested review from DougGregor and jrose-apple July 16, 2018 20:27
@rudkx
Copy link
Contributor Author

rudkx commented Jul 16, 2018

@swift-ci Please smoke test

Copy link
Contributor

@jrose-apple jrose-apple left a comment

Choose a reason for hiding this comment

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

Oof. This does seem correct to me. Thanks, Mark.

@rudkx rudkx merged commit c2767f1 into swiftlang:master Jul 16, 2018
@rudkx rudkx deleted the rdar41888568 branch July 16, 2018 22:12
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