Commit 133641fa authored by hjk's avatar hjk
Browse files

debugger: add size checks for std::deque and hash_set dumper

parent b23e2bb9
......@@ -1849,6 +1849,7 @@ def qdump__std__deque(d, item):
impl = item.value["_M_impl"]
start = impl["_M_start"]
size = impl["_M_finish"]["_M_cur"] - start["_M_cur"]
check(0 <= size and size <= 1000 * 1000 * 1000)
d.putItemCount(size)
d.putNumChild(size)
if d.isExpanded(item):
......@@ -2076,6 +2077,7 @@ def qdump__wstring(d, item):
def qdump____gnu_cxx__hash_set(d, item):
ht = item.value["_M_ht"]
size = ht["_M_num_elements"]
check(0 <= size and size <= 1000 * 1000 * 1000)
d.putItemCount(size)
d.putNumChild(size)
type = item.value.type.template_argument(0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment