[lldb] Add missing nullptr checks to AppleObjCRuntime::GetBacktraceThreadFromException
authorRaphael Isemann <teemperor@gmail.com>
Mon, 11 May 2020 14:02:17 +0000 (16:02 +0200)
committerRaphael Isemann <teemperor@gmail.com>
Mon, 11 May 2020 14:02:51 +0000 (16:02 +0200)
commitf8af9f5fca7dac5479a43837daa3e2bd897b00b7
tree3d76e3b9fab1dd26816177d2e8ac9ec57c5b7fe3
parente87362e6894e052456c645129ac570f6bc23e8d1
[lldb] Add missing nullptr checks to AppleObjCRuntime::GetBacktraceThreadFromException

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
lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp