================
@@ -734,9 +740,13 @@ def update(self):
             # variable tells which element in this NxM array is the 0th
             # one, and the 'size' element gives the number of elements
             # in the deque.
-            count = self._get_value_of_compressed_pair(
-                self.valobj.GetChildMemberWithName("__size_")
-            )
+            if has_compressed_pair_layout:
+                count = self._get_value_of_compressed_pair(
+                    self.valobj.GetChildMemberWithName("__size_")
+                )
+            else:
+                count = size_valobj.GetValueAsUnsigned(0)
----------------
clayborg wrote:

Is there any verification we can do on this to ensure the data in this object 
is not just random data because the class hasn't been initialized? We had an 
issue with `std::initializer_list<T>` being super simple and if random data was 
in the object, its size could be huge. Can we verify the alignment of anything 
like `__begin_` or `__end_cap_` and if anything look really off or not aligned 
correctly return zero as the count?

https://github.com/llvm/llvm-project/pull/96538
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to