Files
llvm/lldb
Aaron 10ceca8a96 [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>
2025-12-01 15:06:48 +00:00
..