nxgdb/mm: warning if corrupted memory node found

If the nodesize is 0, we cannot iterate to next node, siliently return None will cause memleak command to generate false positive report with no warnings.
Add log to indicate such case.

Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
This commit is contained in:
xuxingliang
2024-12-20 20:07:31 +08:00
committed by archer
parent ef52c68e06
commit 1577fe3160

View File

@@ -479,6 +479,7 @@ class MMNode(gdb.Value, p.MMFreeNode):
@property
def nextnode(self) -> MMNode:
if not self.nodesize:
gdb.write(f"\n\x1b[31;1m Node corrupted: {self} \x1b[m\n")
return None
addr = int(self.address) + self.nodesize