summary refs log tree commit diff stats
path: root/results/classifier/user-mode-bugs/1233225
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-07-05 20:00:38 +0200
committerChristian Krinitsin <mail@krinitsin.com>2025-07-05 20:00:38 +0200
commit96049c939b1916d80532630d63c14e04d5244f1d (patch)
tree7fb9df428f074078e714f1e038210cdff887185a /results/classifier/user-mode-bugs/1233225
parent40bbb77d4dfebff4f99c2f90b2c0db737b0ecc5a (diff)
downloadqemu-analysis-96049c939b1916d80532630d63c14e04d5244f1d.tar.gz
qemu-analysis-96049c939b1916d80532630d63c14e04d5244f1d.zip
lock user-mode and semantic-bugs
Diffstat (limited to 'results/classifier/user-mode-bugs/1233225')
-rw-r--r--results/classifier/user-mode-bugs/123322526
1 files changed, 26 insertions, 0 deletions
diff --git a/results/classifier/user-mode-bugs/1233225 b/results/classifier/user-mode-bugs/1233225
new file mode 100644
index 000000000..da87b8698
--- /dev/null
+++ b/results/classifier/user-mode-bugs/1233225
@@ -0,0 +1,26 @@
+
+
+mips/mipsel linux user float division problem
+
+Hi,
+
+I tested the following with the qemu git HEAD as of 2013-09-30 on Debian stable and testing. My host runs amd64 but I also tried this out inside a i386 chroot with the same result. The problem occurs for mips and mipsel. Given the following program:
+
+#include <stdio.h>
+int main(int argc, char **argv)
+{
+    int a = 1;
+    double d = a/2.0;
+    printf("%f\n", d);
+    return 0;
+}
+
+Instead of printing 0.5, it will print 2.0 if executed in qemu user mode.
+
+$ mipsel-linux-gnu-gcc mipstest.c
+$ ~/qemu/mipsel-linux-user/qemu-mipsel ./a.out
+2.0
+
+Expecting this to be a problem with my cross compiler (gcc-4.4 from emdebian) I ran a fully emulated debian squeeze environment inside qemu. There, I compiled the same program natively with gcc and as expected got 0.5 as the output. I also copied the cross compiled binary inside the emulated environment and also got 0.5 when I ran it. So the same mips/mipsel binary produces different output depending on whether it is run in a fully emulated environment or qemu user mode.
+
+Can anybody else reproduce this problem?
\ No newline at end of file