summary refs log tree commit diff stats
path: root/results/classifier/118/none/1060
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/none/1060
parentb89a938452613061c0f1f23e710281cf5c83cb29 (diff)
downloadqemu-analysis-9aba81d8eb048db908c94a3c40c25a5fde0caee6.tar.gz
qemu-analysis-9aba81d8eb048db908c94a3c40c25a5fde0caee6.zip
add 18th iteration of classifier
Diffstat (limited to 'results/classifier/118/none/1060')
-rw-r--r--results/classifier/118/none/106063
1 files changed, 63 insertions, 0 deletions
diff --git a/results/classifier/118/none/1060 b/results/classifier/118/none/1060
new file mode 100644
index 000000000..44312acff
--- /dev/null
+++ b/results/classifier/118/none/1060
@@ -0,0 +1,63 @@
+risc-v: 0.765
+mistranslation: 0.718
+device: 0.604
+graphic: 0.540
+architecture: 0.501
+semantic: 0.443
+assembly: 0.442
+ppc: 0.405
+debug: 0.343
+vnc: 0.323
+hypervisor: 0.278
+PID: 0.230
+socket: 0.226
+kernel: 0.223
+performance: 0.190
+boot: 0.186
+network: 0.177
+register: 0.171
+permissions: 0.166
+arm: 0.148
+x86: 0.134
+files: 0.131
+virtual: 0.111
+peripherals: 0.101
+user-level: 0.091
+i386: 0.090
+TCG: 0.085
+VMM: 0.069
+KVM: 0.052
+
+RISC-V: mtval/stval is not correctly set to the instruction itself on illegal instructions
+Description of problem:
+QEMU 7.0 claims to support `stval`/`mtval` for illegal instructions, but `mtval`/`stval` is actually set to `0`
+Steps to reproduce:
+1. Assemble and link `mtval-illegal.elf`. The code simply sets up a trap handler and generates an illegal instruction exception
+
+2. Start QEMU with:
+
+  ```
+  qemu-system-riscv64 -cpu rv64,h=off -bios mtval-illegal.elf -nographic -icount shift=0 -s -S
+  ```
+
+3. Attach with GDB:
+
+  ```
+  gdb mtval-illegal.elf
+
+  # Within GDB
+  target extended-remote :1234
+  break trap
+  disp $mtval
+
+  # Keep single stepping until breakpoint
+  stepi
+  ```
+
+4. When control flow reaches `trap`, `mtval` is written with `0` instead of the encoding of `csrw time, x0` (`0xc0101073`)
+Additional information:
+Writing `0` to `mtval` on a illegal instruction trap is allowed by the specs, but since the [changelog of QEMU 7.0][changelog] says it should be supported, I would consider it a bug.
+
+[changelog]: https://wiki.qemu.org/ChangeLog/7.0#RISC-V
+
+I encountered this when trying to figure out why my program worked with QEMU 6 but breaks with QEMU 7. It's more complicated, but in that case I managed to get `mtval` written with neither `0` nor the actual illegal instruction, but a different illegal instruction. I will try gathering up all the dependencies and write down the steps to reproduce if needed and if I find the time.