[Lldb-commits] [PATCH] D74096: [lldb/API] Fix the dangling pointer issue in SBThread::GetStopDescription

Frederic Riss via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Feb 5 15:51:34 PST 2020


friss added inline comments.


================
Comment at: lldb/source/API/SBThread.cpp:361-363
             stop_desc =
                 exe_ctx.GetProcessPtr()->GetUnixSignals()->GetSignalAsCString(
                     stop_info_sp->GetValue());
----------------
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).


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