summaryrefslogtreecommitdiff
path: root/disas.c
diff options
context:
space:
mode:
authormalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-21 22:26:22 +0000
committermalc <malc@c046a42c-6fe2-441c-8c8c-71466251a162>2009-04-21 22:26:22 +0000
commit754d00ae3a1bfabb6069b59f72cdec1dee99ea0b (patch)
tree33445a7ac1392d87a6fd6f5450201c20b71d63ba /disas.c
parent8d6249a73adefb2468154b7da70c61b23e393d5b (diff)
downloadqemu-754d00ae3a1bfabb6069b59f72cdec1dee99ea0b.tar.gz
qemu-754d00ae3a1bfabb6069b59f72cdec1dee99ea0b.tar.bz2
qemu-754d00ae3a1bfabb6069b59f72cdec1dee99ea0b.zip
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
Diffstat (limited to 'disas.c')
-rw-r--r--disas.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/disas.c b/disas.c
index 6bf7592702..37f7433c3b 100644
--- a/disas.c
+++ b/disas.c
@@ -222,6 +222,13 @@ void target_disas(FILE *out, target_ulong code, target_ulong size, int flags)
fprintf(out, "\n");
if (count < 0)
break;
+ if (size < count) {
+ fprintf(out,
+ "Disassembler disagrees with translator over instruction "
+ "decoding\n"
+ "Please report this to qemu-devel@nongnu.org\n");
+ break;
+ }
}
}