llvm-project
10ceca8a - [lldb-dap] Fix segfault in JSONUtils.cpp when GetUUIDString() returns nullptr (#169844)

Commit
60 days ago
[lldb-dap] Fix segfault in JSONUtils.cpp when GetUUIDString() returns nullptr (#169844) When creating a stack frame in JSONUtils.cpp CreateStackFrame() the code constructs a std::string from module.GetUUIDString(), which can return nullptr in some cases (as documented in the implementation of SBModule::GetUUIDString()). This causes a segmentation fault when passed to the std::string constructor. This fix adds a null check before constructing the UUID string, falling back to an empty string if nullptr is returned. The existing empty check ensures the moduleId field is omitted from the JSON when no UUID exists. rdar://163811812 --------- Co-authored-by: Ebuka Ezike <yerimyah1@gmail.com>
Author
Parents
Loading