summary refs log tree commit diff stats
path: root/results/classifier/118/architecture-x86/1648
diff options
context:
space:
mode:
authorChristian Krinitsin <mail@krinitsin.com>2025-06-16 16:59:00 +0000
committerChristian Krinitsin <mail@krinitsin.com>2025-06-16 16:59:33 +0000
commit9aba81d8eb048db908c94a3c40c25a5fde0caee6 (patch)
treeb765e7fb5e9a3c2143c68b0414e0055adb70e785 /results/classifier/118/architecture-x86/1648
parentb89a938452613061c0f1f23e710281cf5c83cb29 (diff)
downloademulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz
emulator-bug-study-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/architecture-x86/1648')
-rw-r--r--results/classifier/118/architecture-x86/1648118
1 files changed, 118 insertions, 0 deletions
diff --git a/results/classifier/118/architecture-x86/1648 b/results/classifier/118/architecture-x86/1648
new file mode 100644
index 00000000..f237c54c
--- /dev/null
+++ b/results/classifier/118/architecture-x86/1648
@@ -0,0 +1,118 @@
+x86: 0.957
+i386: 0.949
+architecture: 0.834
+permissions: 0.763
+device: 0.723
+performance: 0.709
+kernel: 0.692
+assembly: 0.603
+ppc: 0.599
+socket: 0.563
+peripherals: 0.560
+vnc: 0.505
+PID: 0.500
+network: 0.482
+user-level: 0.481
+register: 0.470
+graphic: 0.460
+files: 0.442
+boot: 0.428
+hypervisor: 0.410
+semantic: 0.379
+arm: 0.356
+VMM: 0.355
+KVM: 0.352
+risc-v: 0.333
+TCG: 0.328
+debug: 0.301
+virtual: 0.217
+mistranslation: 0.206
+--------------------
+debug: 0.948
+user-level: 0.938
+architecture: 0.193
+x86: 0.169
+register: 0.064
+kernel: 0.040
+TCG: 0.033
+files: 0.031
+PID: 0.020
+assembly: 0.019
+performance: 0.017
+semantic: 0.010
+hypervisor: 0.007
+device: 0.004
+virtual: 0.003
+peripherals: 0.002
+boot: 0.002
+network: 0.002
+KVM: 0.002
+socket: 0.001
+VMM: 0.001
+permissions: 0.001
+graphic: 0.001
+vnc: 0.001
+i386: 0.001
+mistranslation: 0.001
+risc-v: 0.000
+ppc: 0.000
+arm: 0.000
+
+linux-user: incorrect alignment of sigframe::pretcode & rt_sigframe::pretcode cause crash
+Description of problem:
+Corrent Print Result:
+
+sp: cdd3b4e8
+
+SUCCEEDED!
+
+qemu-x86_64 Print Result:
+
+sp: 2804170
+
+qemu: uncaught target signal 11 (Segmentation fault) - core dumped
+
+Segmentation fault
+
+Reason of Bug:
+
+sigframe::pretcode & rt_sigframe::pretcode must align of 16n-sizeof(void*) instead of 16n, Because rsp align of 16n before instruction "call" in caller, After "call", push address of "call" in caller. sp of begin in callee is 16n-sizeof(void*)
+
+For example on x86_64:
+
+reference to "qemu/linux-user/i386/signal.c"
+
+```
+# define TARGET_FPSTATE_FXSAVE_OFFSET 0
+
+struct rt_sigframe {
+    abi_ulong pretcode;
+    struct target_ucontext uc;
+    struct target_siginfo info;
+    struct target_fpstate fpstate QEMU_ALIGNED(16);
+};
+#define TARGET_RT_SIGFRAME_FXSAVE_OFFSET (                                 \
+    offsetof(struct rt_sigframe, fpstate) + TARGET_FPSTATE_FXSAVE_OFFSET)
+```
+
+offsetof(struct rt_sigframe, fpstate) align of 16
+
+TARGET_FPSTATE_FXSAVE_OFFSET is 0
+
+TARGET_RT_SIGFRAME_FXSAVE_OFFSET is 16n, also alignment of fxsave is 64
+
+so address of rt_sigframe::pretcode is 16n instead of 16n - sizeof(void*), It is incorect!
+
+Fix the bug:
+
+```
+struct rt_sigframe {
+    abi_ulong pretcode;
+    struct target_ucontext uc;
+    struct target_siginfo info;
+    abi_ulong unused QEMU_ALIGNED(16);
+    struct target_fpstate fpstate;
+};
+```
+
+offsetof(struct rt_sigframe, fpstate) is 16n+8, so address of rt_sigframe::pretcode is 16n-8 on x86_64.