[Lldb-commits] [PATCH] D74096: [lldb/API] Fix the dangling pointer issue in SBThread::GetStopDescription
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Feb 5 16:10:51 PST 2020
JDevlieghere added inline comments.
================
Comment at: lldb/source/API/SBThread.cpp:361-363
stop_desc =
exe_ctx.GetProcessPtr()->GetUnixSignals()->GetSignalAsCString(
stop_info_sp->GetValue());
----------------
JDevlieghere wrote:
> friss wrote:
> > I don't think this is generally safe. Creating a `std::string` from a nullptr is undefined (and the previous test makes it look like this pointer could be null).
> `GetStopDescription` now returns a `std::string`, so it should be fine here?
nvm, I didn't see the variable got assigned again
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74096/new/
https://reviews.llvm.org/D74096
More information about the lldb-commits
mailing list