Commit 754d00ae3a1bfabb6069b59f72cdec1dee99ea0b
1 parent
8d6249a7
Safety net for the cases where disassembler/translator disagree over instruction decoding
Noticed by Mark Karpeles. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7209 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
1 changed file
with
7 additions
and
0 deletions
disas.c
| @@ -222,6 +222,13 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags) | @@ -222,6 +222,13 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags) | ||
| 222 | fprintf(out, "\n"); | 222 | fprintf(out, "\n"); |
| 223 | if (count < 0) | 223 | if (count < 0) |
| 224 | break; | 224 | break; |
| 225 | + if (size < count) { | ||
| 226 | + fprintf(out, | ||
| 227 | + "Disassembler disagrees with translator over instruction " | ||
| 228 | + "decoding\n" | ||
| 229 | + "Please report this to qemu-devel@nongnu.org\n"); | ||
| 230 | + break; | ||
| 231 | + } | ||
| 225 | } | 232 | } |
| 226 | } | 233 | } |
| 227 | 234 |