|
|
|
@ -37,16 +37,17 @@ def format_bin(bins, verbose=False, offset=None):
|
|
|
|
offset = main_heap.chunk_key_offset('fd')
|
|
|
|
offset = main_heap.chunk_key_offset('fd')
|
|
|
|
|
|
|
|
|
|
|
|
result = []
|
|
|
|
result = []
|
|
|
|
|
|
|
|
bins_type = bins.pop('type')
|
|
|
|
|
|
|
|
|
|
|
|
for size in bins:
|
|
|
|
for size in bins:
|
|
|
|
b = bins[size]
|
|
|
|
b = bins[size]
|
|
|
|
|
|
|
|
|
|
|
|
count, is_chain_corrupted = None, False
|
|
|
|
count, is_chain_corrupted = None, False
|
|
|
|
|
|
|
|
|
|
|
|
# fastbins consists of only single linked list
|
|
|
|
# fastbins consists of only single linked list
|
|
|
|
if len(b) == 1: # fastbin:
|
|
|
|
if bins_type == 'fastbins':
|
|
|
|
chain_fd = b
|
|
|
|
chain_fd = b
|
|
|
|
# tcachebins consists of single linked list and entries count
|
|
|
|
# tcachebins consists of single linked list and entries count
|
|
|
|
elif len(b) == 2: # tcachebin:
|
|
|
|
elif bins_type == 'tcachebins':
|
|
|
|
chain_fd, count = b
|
|
|
|
chain_fd, count = b
|
|
|
|
# normal bins consists of double linked list and may be corrupted (we can detect corruption)
|
|
|
|
# normal bins consists of double linked list and may be corrupted (we can detect corruption)
|
|
|
|
else: # normal bin
|
|
|
|
else: # normal bin
|
|
|
|
|