Don't call hooks if there is already an unhandled exception
This commit is contained in:
@@ -1441,6 +1441,8 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
|||||||
// memory might be still unmapped while reading or fetching
|
// memory might be still unmapped while reading or fetching
|
||||||
if (mr == NULL) {
|
if (mr == NULL) {
|
||||||
handled = false;
|
handled = false;
|
||||||
|
// if there is already an unhandled eror, skip callbacks.
|
||||||
|
if (uc->invalid_error == UC_ERR_OK) {
|
||||||
if (code_read) {
|
if (code_read) {
|
||||||
// code fetching
|
// code fetching
|
||||||
error_code = UC_ERR_FETCH_UNMAPPED;
|
error_code = UC_ERR_FETCH_UNMAPPED;
|
||||||
@@ -1472,6 +1474,9 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
error_code = uc->invalid_error;
|
||||||
|
}
|
||||||
|
|
||||||
if (handled) {
|
if (handled) {
|
||||||
uc->invalid_error = UC_ERR_OK;
|
uc->invalid_error = UC_ERR_OK;
|
||||||
|
|||||||
Reference in New Issue
Block a user