[Lldb-commits] [lldb] [LLDB] Fix UBSan issue with ValueType enums. (PR #195540)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Mon May 4 22:02:50 PDT 2026


================
@@ -342,14 +342,13 @@ enum ValueType {
   eValueTypeVariableThreadLocal = 8, ///< thread local storage variable
   eValueTypeVTable = 9,              ///< virtual function table
   eValueTypeVTableEntry = 10, ///< function pointer in virtual function table
+  /// A mask that we can use to check if the value type is synthetic or not.
+  // NOTE: This limits the number of value types to 31, but that's 3x more than
+  // what we currently have now. See lldb/Utility/ValueType.h for helpers for
+  // working with synthetic value types.
----------------
JDevlieghere wrote:

```suggestion
  /// A mask that we can use to check if the value type is synthetic or not.
  /// NOTE: This limits the number of value types to 31, but that's 3x more than
  /// what we currently have now. See lldb/Utility/ValueType.h for helpers for
  /// working with synthetic value types.
```

https://github.com/llvm/llvm-project/pull/195540


More information about the lldb-commits mailing list