[Lldb-commits] [lldb] [lldb-dap] Fix segfault in JSONUtils.cpp when GetUUIDString() returns nullptr (PR #169844)
David Spickett via lldb-commits
lldb-commits at lists.llvm.org
Fri Nov 28 02:22:39 PST 2025
================
@@ -554,7 +554,8 @@ llvm::json::Value CreateStackFrame(DAP &dap, lldb::SBFrame &frame,
lldb::SBModule module = frame.GetModule();
if (module.IsValid()) {
- std::string uuid = module.GetUUIDString();
+ const char *uuid_cstr = module.GetUUIDString();
+ std::string uuid = uuid_cstr ? uuid_cstr : "";
if (!uuid.empty())
----------------
DavidSpickett wrote:
You could instead do:
```
if (uuid_cstr) {
..., std::string(uuid_cstr)
```
https://github.com/llvm/llvm-project/pull/169844
More information about the lldb-commits
mailing list