stop emulation when hitting invalid code address. this fixes issue #82
This commit is contained in:
@@ -205,6 +205,8 @@ int cpu_exec(struct uc_struct *uc, CPUArchState *env) // qq
|
||||
have_tb_lock = true;
|
||||
tb = tb_find_fast(env); // qq
|
||||
if (!tb) { // invalid TB due to invalid code?
|
||||
uc->invalid_error = UC_ERR_CODE_INVALID;
|
||||
ret = EXCP_HLT;
|
||||
break;
|
||||
}
|
||||
/* Note: we do it here to avoid a gcc bug on Mac OS X when
|
||||
|
||||
Reference in New Issue
Block a user