diff options
| author | Christian Krinitsin <mail@krinitsin.com> | 2025-05-21 21:21:26 +0200 |
|---|---|---|
| committer | Christian Krinitsin <mail@krinitsin.com> | 2025-05-21 21:21:26 +0200 |
| commit | 4b927bc37359dec23f67d3427fc982945f24f404 (patch) | |
| tree | 245449ef9146942dc7fffd0235b48b7e70a00bf2 /gitlab/issues/target_sh4/host_missing/accel_missing | |
| parent | aa8bd79cec7bf6790ddb01d156c2ef2201abbaab (diff) | |
| download | qemu-analysis-4b927bc37359dec23f67d3427fc982945f24f404.tar.gz qemu-analysis-4b927bc37359dec23f67d3427fc982945f24f404.zip | |
add gitlab issues in toml format
Diffstat (limited to 'gitlab/issues/target_sh4/host_missing/accel_missing')
5 files changed, 187 insertions, 0 deletions
diff --git a/gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml b/gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml new file mode 100644 index 000000000..8b39bb732 --- /dev/null +++ b/gitlab/issues/target_sh4/host_missing/accel_missing/2317.toml @@ -0,0 +1,46 @@ +id = 2317 +title = "SH4: ADDV instruction not emulated properly" +state = "closed" +created_at = "2024-04-29T17:09:55.119Z" +closed_at = "2024-05-04T02:01:16.513Z" +labels = ["kind::Bug", "target: sh4", "workflow::Patch available"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2317" +host-os = "Debian testing" +host-arch = "x86_64" +qemu-version = "qemu-sh4 version 8.2.1 (Debian 1:8.2.1+ds-2)" +guest-os = "Buildroot uClibc (qemu-user)" +guest-arch = "SH4" +description = """ADDV opcode is emulated incorrectly. + +The documentation says: + +`ADDV Rm, Rn Rn + Rm -> Rn, overflow -> T` + +What Qemu actually emulates: + +`ADDV Rm, Rn Rn + Rm -> Rm, overflow -> T`""" +reproduce = """```c +#include <stdio.h> + +int main(void) +{ +\tregister unsigned int a asm("r8") = 0x7fffffff; +\tregister unsigned int b asm("r9") = 1; +\tregister unsigned int c asm("r10"); + +\tasm volatile("clrt\\n" +\t\t "addv %2,%0\\n" +\t\t "movt %1\\n" +\t\t : "+r"(a), "=r"(c) : "r"(b) :); + +\tprintf("Values: a=0x%x b=0x%x c=0x%x\\n", a, b, c); + +\treturn 0; +} + +```""" +additional = """Tested on real hardware (SEGA Dreamcast, GCC 15.0), the program above prints: +`Values: a=0x80000000 b=0x1 c=0x1` + +Running with Qemu (and GCC 13.0), the same program prints: +`Values: a=0x7fffffff b=0x80000000 c=0x1`""" diff --git a/gitlab/issues/target_sh4/host_missing/accel_missing/2318.toml b/gitlab/issues/target_sh4/host_missing/accel_missing/2318.toml new file mode 100644 index 000000000..8cfd8e0f2 --- /dev/null +++ b/gitlab/issues/target_sh4/host_missing/accel_missing/2318.toml @@ -0,0 +1,42 @@ +id = 2318 +title = "SH4: SUBV instruction not emulated properly" +state = "closed" +created_at = "2024-04-29T17:36:33.900Z" +closed_at = "2024-05-04T02:01:16.498Z" +labels = ["target: sh4", "workflow::Patch available"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/2318" +host-os = "Debian testing" +host-arch = "x86_64" +qemu-version = "qemu-sh4 version 8.2.1 (Debian 1:8.2.1+ds-2)" +guest-os = "Buildroot uClibc (qemu-user)" +guest-arch = "SH4" +description = """SUBV opcode is emulated incorrectly. + +The documentation says: + +`SUBV Rm, Rn Rn - Rm -> Rn, underflow -> T` + +Qemu seems to perform the subtraction correctly, but will not detect an underflow.""" +reproduce = """```c +#include <stdio.h> + +int main(void) +{ +\tregister unsigned int a asm("r8") = 0x80000001; +\tregister unsigned int b asm("r9") = 0x2; +\tregister unsigned int c asm("r10"); + +\tasm volatile("subv %2,%0\\n" +\t\t "movt %1\\n" +\t\t : "+r"(a), "=r"(c) : "r"(b) :); + +\tprintf("Values: a=0x%x b=0x%x c=0x%x\\n", a, b, c); + +\treturn 0; +} +```""" +additional = """Tested on real hardware (SEGA Dreamcast, GCC 15.0), the program above prints: +`Values: a=0x7fffffff b=0x2 c=0x1` + +Running with Qemu (and GCC 13.0), the same program prints: +`Values: a=0x7fffffff b=0x2 c=0x0`""" diff --git a/gitlab/issues/target_sh4/host_missing/accel_missing/376.toml b/gitlab/issues/target_sh4/host_missing/accel_missing/376.toml new file mode 100644 index 000000000..14630189a --- /dev/null +++ b/gitlab/issues/target_sh4/host_missing/accel_missing/376.toml @@ -0,0 +1,15 @@ +id = 376 +title = "Indentation should be done with spaces, not with TABs, in the SH4 subsystem" +state = "closed" +created_at = "2021-05-31T06:48:28.588Z" +closed_at = "2023-12-05T12:32:56.442Z" +labels = ["Bite Sized", "kind::Task", "target: sh4", "workflow::Triaged"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/376" +host-os = "n/a" +host-arch = "n/a" +qemu-version = "n/a" +guest-os = "n/a" +guest-arch = "n/a" +description = "n/a" +reproduce = "n/a" +additional = "n/a" diff --git a/gitlab/issues/target_sh4/host_missing/accel_missing/570.toml b/gitlab/issues/target_sh4/host_missing/accel_missing/570.toml new file mode 100644 index 000000000..f00275ce8 --- /dev/null +++ b/gitlab/issues/target_sh4/host_missing/accel_missing/570.toml @@ -0,0 +1,15 @@ +id = 570 +title = "linux-user/sh4/termbits.h:276: warning: \"TIOCSER_TEMT\" redefined" +state = "closed" +created_at = "2021-08-27T13:59:35.396Z" +closed_at = "2022-08-04T15:23:16.024Z" +labels = ["Build System", "linux-user", "target: sh4"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/570" +host-os = "n/a" +host-arch = "n/a" +qemu-version = "n/a" +guest-os = "n/a" +guest-arch = "n/a" +description = "n/a" +reproduce = "n/a" +additional = "n/a" diff --git a/gitlab/issues/target_sh4/host_missing/accel_missing/856.toml b/gitlab/issues/target_sh4/host_missing/accel_missing/856.toml new file mode 100644 index 000000000..241f12738 --- /dev/null +++ b/gitlab/issues/target_sh4/host_missing/accel_missing/856.toml @@ -0,0 +1,69 @@ +id = 856 +title = "Occasional deadlock in linux-user (sh4) when running threadcount test" +state = "closed" +created_at = "2022-02-04T09:40:54.989Z" +closed_at = "2022-10-05T17:55:16.003Z" +labels = ["Closed::Fixed", "kind::Bug", "linux-user", "target: sh4"] +url = "https://gitlab.com/qemu-project/qemu/-/issues/856" +host-os = "(Debian 10 - deibna-all-test-cross CI image)" +host-arch = "x86_64" +qemu-version = "6.2.50 (head as of f7c0e223acd5021d03736644cc0abf3501003820)" +guest-os = "Linux (linux-user)" +guest-arch = "SH4" +description = """""" +reproduce = """1. docker run --rm -it -u (id -u) -v $HOME:$HOME -w (pwd) qemu/debian-all-test-cross /bin/bash +2. '../../configure' '--cc=clang' '--cxx=clang++' '--disable-system' '--target-list-exclude=microblazeel-linux-user,aarch64_be-linux-user,i386-linux-user,m68k-linux-user,mipsn32el-linux-user,xtensaeb-linux-user' '--extra-cflags=-fsanitize=undefined' '--extra-cflags=-fno-sanitize-recover=undefined' +3. make; make build-tcg +4. retry.py -n 400 -c -- timeout --foreground 90 ./qemu-sh4 -plugin ./tests/plugin/libinsn.so -d plugin ./tests/tcg/sh4-linux-user/threadcount + +Failure rate on hackbox: + +``` +Results summary: +0: 397 times (99.25%), avg time 0.686 (0.00 varience/0.01 deviation) +124: 3 times (0.75%), avg time 90.559 (0.00 varience/0.01 deviation) +``` + +It seems to fail more frequently on Gitlabs CI""" +additional = """Without the timeout you end up with a deadlock. The following backtrace was found, stepping in gdb unwedges the hang: + +``` +(gdb) info threads + Id Target Id Frame +* 1 LWP 15894 "qemu-sh4" safe_syscall_base () at ../../common-user/host/x86_64/safe-syscall.inc.S:75 + 2 LWP 15994 "qemu-sh4" 0x00007f956b800f59 in syscall () from target:/lib/x86_64-linux-gnu/libc.so.6 + 3 LWP 15997 "qemu-sh4" safe_syscall_base () at ../../common-user/host/x86_64/safe-syscall.inc.S:75 +(gdb) bt +#0 safe_syscall_base () at ../../common-user/host/x86_64/safe-syscall.inc.S:75 +#1 0x0000560ee17196e4 in safe_futex (uaddr=0x58e8, op=-513652411, val=<optimized out>, timeout=0xf0, uaddr2=<optimized out>, val3=582) at ../../linux-user/syscall.c:681 +#2 do_safe_futex (uaddr=0x58e8, op=-513652411, val=<optimized out>, timeout=0xf0, uaddr2=<optimized out>, val3=582) at ../../linux-user/syscall.c:7757 +#3 0x0000560ee170c8d9 in do_syscall1 (cpu_env=<optimized out>, num=<optimized out>, arg1=<optimized out>, arg2=<optimized out>, arg3=22760, arg4=<optimized out>, arg5=<optimized out>, arg6=240, arg7=0, arg8=0) at /home/alex.bennee/lsrc/qemu.git/include/exec/cpu_ldst.h:90 +#4 0x0000560ee170220c in do_syscall (cpu_env=<optimized out>, num=<optimized out>, arg1=<optimized out>, arg2=<optimized out>, arg3=<optimized out>, arg4=<optimized out>, arg5=<optimized out>, arg6=<optimized out>, arg7=<optimized out>, arg8=<optimized out>) at ../../linux-user/syscall.c:13239 +#5 0x0000560ee1626111 in cpu_loop (env=0x560ee294b028) at ../../linux-user/sh4/cpu_loop.c:43 +#6 0x0000560ee16ee37d in main (argc=-493657104, argv=0x7ffdcaf52028, envp=<optimized out>) at ../../linux-user/main.c:883 +(gdb) thread 2 +[Switching to thread 2 (LWP 15994)] +#0 0x00007f956b800f59 in syscall () from target:/lib/x86_64-linux-gnu/libc.so.6 +(gdb) bt +#0 0x00007f956b800f59 in syscall () from target:/lib/x86_64-linux-gnu/libc.so.6 +#1 0x0000560ee1847bd6 in qemu_futex_wait (f=<optimized out>, val=<optimized out>) at /home/alex.bennee/lsrc/qemu.git/include/qemu/futex.h:29 +#2 qemu_event_wait (ev=0x560ee2738974 <rcu_call_ready_event>) at ../../util/qemu-thread-posix.c:481 +#3 0x0000560ee18539a2 in call_rcu_thread (opaque=<optimized out>) at ../../util/rcu.c:261 +#4 0x0000560ee1847f17 in qemu_thread_start (args=0x560ee2933eb0) at ../../util/qemu-thread-posix.c:556 +#5 0x00007f956b8f6fa3 in start_thread () from target:/lib/x86_64-linux-gnu/libpthread.so.0 +#6 0x00007f956b8064cf in clone () from target:/lib/x86_64-linux-gnu/libc.so.6 +(gdb) thread 3 +[Switching to thread 3 (LWP 15997)] +#0 safe_syscall_base () at ../../common-user/host/x86_64/safe-syscall.inc.S:75 +75 cmp $-4095, %rax +(gdb) bt +#0 safe_syscall_base () at ../../common-user/host/x86_64/safe-syscall.inc.S:75 +#1 0x0000560ee17196e4 in safe_futex (uaddr=0x2, op=-513652411, val=<optimized out>, timeout=0x3f7fcdc4, uaddr2=<optimized out>, val3=582) at ../../linux-user/syscall.c:681 +#2 do_safe_futex (uaddr=0x2, op=-513652411, val=<optimized out>, timeout=0x3f7fcdc4, uaddr2=<optimized out>, val3=582) at ../../linux-user/syscall.c:7757 +#3 0x0000560ee170c8d9 in do_syscall1 (cpu_env=<optimized out>, num=<optimized out>, arg1=<optimized out>, arg2=<optimized out>, arg3=2, arg4=<optimized out>, arg5=<optimized out>, arg6=1065340356, arg7=0, arg8=0) at /home/alex.bennee/lsrc/qemu.git/include/exec/cpu_ldst.h:90 +#4 0x0000560ee170220c in do_syscall (cpu_env=<optimized out>, num=<optimized out>, arg1=<optimized out>, arg2=<optimized out>, arg3=<optimized out>, arg4=<optimized out>, arg5=<optimized out>, arg6=<optimized out>, arg7=<optimized out>, arg8=<optimized out>) at ../../linux-user/syscall.c:13239 +#5 0x0000560ee1626111 in cpu_loop (env=0x560ee2a2c2d8) at ../../linux-user/sh4/cpu_loop.c:43 +#6 0x0000560ee171728f in clone_func (arg=<optimized out>) at ../../linux-user/syscall.c:6608 +#7 0x00007f956b8f6fa3 in start_thread () from target:/lib/x86_64-linux-gnu/libpthread.so.0 +#8 0x00007f956b8064cf in clone () from target:/lib/x86_64-linux-gnu/libc.so.6 +```""" |