angr / simuvex

[DEPRECATED] A symbolic execution engine for the VEX IR
BSD 2-Clause "Simplified" License
79 stars 57 forks source link

SimPagedMemory throwing AttributeError in concrete_parts() and dbg_print() #153

Open RayFoulk opened 7 years ago

RayFoulk commented 7 years ago
  File "simuvex/plugins/symbolic_memory.py", line 941, in concrete_parts
    for k,v in self.mem.iteritems():
AttributeError: 'SimPagedMemory' object has no attribute 'iteritems'

  File "simuvex/plugins/symbolic_memory.py", line 953, in dbg_print
    for i, addr in enumerate(self.mem.iterkeys()):
AttributeError: 'SimPagedMemory' object has no attribute 'iterkeys'

Looks like self.mem is assumed to be a dictionary at these points but it (at least in my case) doesn't appear to be as it's created on lines 47-51 as self.mem = SimPagedMemory(

zardus commented 7 years ago

Yeah, this changed after the r/trees branch, which refactored SimPagedMemory. The new way would be to iterate over all pages (unfortunately, this would be self.mem._pages.values()) and then getting the keys for each page (page.keys()).