Skip to content
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

[lldb] Add missing nullptr checks to AppleObjCRuntime::GetBacktraceTh… #1207

Conversation

Teemperor
Copy link

…readFromException

Summary:
We got a few crash reports where LLDB crashes while derefencing the frames_value shared_ptr in the AppleObjCRuntime::GetBacktraceThreadFromException. GetChildMemberWithName returns a nullptr when an error occurs, so this seems to be just a missing nullptr check.

This patch adds that nullptr check and the other ones in the similar code directly below.

Fixes rdar://62174039

Reviewers: jingham, kubamracek

Reviewed By: jingham

Subscribers: abidh, JDevlieghere

Differential Revision: https://reviews.llvm.org/D78798

(cherry picked from commit f8af9f5)

…readFromException

Summary:
We got a few crash reports where LLDB crashes while derefencing the `frames_value` shared_ptr in the AppleObjCRuntime::GetBacktraceThreadFromException. `GetChildMemberWithName` returns a nullptr when an error occurs, so this seems to be just a missing nullptr check.

This patch adds that nullptr check and the other ones in the similar code directly below.

Fixes rdar://62174039

Reviewers: jingham, kubamracek

Reviewed By: jingham

Subscribers: abidh, JDevlieghere

Differential Revision: https://reviews.llvm.org/D78798

(cherry picked from commit f8af9f5)
@Teemperor Teemperor requested a review from fredriss May 11, 2020 14:56
@Teemperor
Copy link
Author

@swift-ci test

@Teemperor Teemperor merged commit 34e235a into swiftlang:apple/stable/20200108 May 11, 2020
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