[Lldb-commits] [lldb] 950f1de - [lldb] Fix UUID thombstone Key (#190551)
via lldb-commits
lldb-commits at lists.llvm.org
Mon Apr 6 13:25:39 PDT 2026
Author: Jonas Devlieghere
Date: 2026-04-06T13:25:34-07:00
New Revision: 950f1de70bbfff9d4581c3102d2107ca6a4512a7
URL: https://github.com/llvm/llvm-project/commit/950f1de70bbfff9d4581c3102d2107ca6a4512a7
DIFF: https://github.com/llvm/llvm-project/commit/950f1de70bbfff9d4581c3102d2107ca6a4512a7.diff
LOG: [lldb] Fix UUID thombstone Key (#190551)
This changes `DenseMapInfo<UUID>::getTombstoneKey()` to return a 1-byte
`{0xFF}` sentinel instead of the empty, default constructed UUID().
Returning the same key for the empty and tombstone value apparently
violates the `DenseMap` invariant.
Added:
Modified:
lldb/include/lldb/Utility/UUID.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Utility/UUID.h b/lldb/include/lldb/Utility/UUID.h
index 8c8fc41e63d50..c64dd573d9bd0 100644
--- a/lldb/include/lldb/Utility/UUID.h
+++ b/lldb/include/lldb/Utility/UUID.h
@@ -112,6 +112,7 @@ class UUID {
friend bool operator>=(const UUID &LHS, const UUID &RHS) {
return !(LHS < RHS);
}
+ friend struct llvm::DenseMapInfo<UUID>;
};
} // namespace lldb_private
@@ -124,7 +125,9 @@ template <> struct DenseMapInfo<lldb_private::UUID> {
return lldb_private::UUID();
}
static inline lldb_private::UUID getTombstoneKey() {
- return lldb_private::UUID();
+ lldb_private::UUID key;
+ key.m_bytes = {0xFF};
+ return key;
}
static unsigned getHashValue(lldb_private::UUID uuid) {
return DenseMapInfo<llvm::ArrayRef<uint8_t>>::getHashValue(uuid.GetBytes());
More information about the lldb-commits
mailing list