[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.
This commit is contained in:
Jonas Devlieghere 2026-04-06 13:25:34 -07:00 committed by GitHub
parent 2aa4100fa7
commit 950f1de70b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,6 +112,7 @@ private:
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());