Skip to content

Commit 6974b53

Browse files
committed
Fix #2078
We shall only go through the else branch for code_read
1 parent fcca82b commit 6974b53

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qemu/accel/tcg/cputlb.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1665,7 +1665,7 @@ load_helper(CPUArchState *env, target_ulong addr, TCGMemOpIdx oi,
16651665
return 0;
16661666
}
16671667
}
1668-
} else {
1668+
} else if (code_read) {
16691669
// code fetching
16701670
// Unicorn: callback on fetch from NX
16711671
if (mr != NULL && !(mr->perms & UC_PROT_EXEC)) { // non-executable

0 commit comments

Comments
 (0)