mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-04 15:09:40 +00:00
Meta: Avoid showing elements in extremely large vectors in gdb
This is most often just an invalid vector anyway.
This commit is contained in:
parent
899888bbf2
commit
265dd9b445
|
@ -251,6 +251,10 @@ class AKVector:
|
|||
else:
|
||||
elements = get_field_unalloced(self.val, "m_inline_buffer_storage", inner_type_ptr)
|
||||
|
||||
# Very arbitrary limit, just to catch UAF'd and garbage vector values with a silly number of elements
|
||||
if vec_len > 373373:
|
||||
return []
|
||||
|
||||
return [(f"[{i}]", elements[i]) for i in range(vec_len)]
|
||||
|
||||
@classmethod
|
||||
|
|
Loading…
Reference in a new issue