From 1bc0a672c7a2e7a8ee74db4cfb49b8aafc94b92a Mon Sep 17 00:00:00 2001 From: Laura Abbott <lauraa@codeaurora.org> Date: Thu, 13 Mar 2014 14:28:00 -0700 Subject: [PATCH] linux-ramdump-parser-v2: Skip bad rodata headers When checking for rodata differences, we scan the ELF headers of the vmlinux. Newer vmlinux files seem to have extra ELF headers with addresses outside the valid mapped range. If we encounter one of those headers and read an invalid address, skip it. Change-Id: I2a8af784df7216bf9d890be42eec8599fbaa7f72 --- linux-ramdump-parser-v2/parsers/roareadiff.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux-ramdump-parser-v2/parsers/roareadiff.py b/linux-ramdump-parser-v2/parsers/roareadiff.py index ab0e805..0bacc8a 100644 --- a/linux-ramdump-parser-v2/parsers/roareadiff.py +++ b/linux-ramdump-parser-v2/parsers/roareadiff.py @@ -57,6 +57,8 @@ class ROData(RamParser): fd.seek(prgheader.offset + (count - prgheader.vaddr)) ram_value = self.ramdump.read_word(count) vm_value = struct.unpack('I', fd.read(4))[0] + if ram_value is None: + break if detect == 0 and vm_value != ram_value: print_out_str( -- GitLab