handle 'bad ram pointer' case. this fixes issue #159

This commit is contained in:
Nguyen Anh Quynh
2015-09-29 18:22:22 +08:00
parent 976950d3c3
commit 4a42041a83
2 changed files with 18 additions and 10 deletions

View File

@ -20,7 +20,10 @@ class Hang(regress.RegressTest):
mu.mem_write(CODE_ADDR, binary1)
mu.reg_write(UC_X86_REG_RSP, RSP_ADDR)
mu.emu_start(CODE_ADDR, CODE_ADDR + PAGE_SIZE, 0)
try:
self.assertEqual(mu.emu_start(CODE_ADDR, CODE_ADDR + PAGE_SIZE, 0), UC_ERR_FETCH_INVALID)
except UcError as e:
print("ERROR: %s" % e)
if __name__ == '__main__':