Qemu aarch64 tcg crashes when emulating an STXP instruction but only on a Windows host
Host environment
- Operating system: Windows 10 22H2
- OS/kernel version: n/a
- Architecture: x86
- QEMU flavor: qemu-system-aarch64
- QEMU version: 8.0.0
- QEMU command line:
./qemu-system-aarch64 -machine virt,accel=tcg,gic-version=3,its=on,mte=on,virtualization=on,secure=on,iommu=none -cpu max -smp 4,sockets=1,clusters=1,cores=4,threads=1,maxcpus=4 -m 4G
Emulated/Virtualized environment
- Operating system: Windows Server 2022
- OS/kernel version: n/a
- Architecture: arm64
Description of problem
Qemu segfaults when trying to emulate an STXP instruction, but only when running natively on a windows host (msys2 build). This is not the same as #1581 (closed).
I've managed to git-bisect it to this change: https://github.com/qemu/qemu/commit/546789c7df8866c55cae8d3195e8e58328a35d51
Sadly i cannot investigate it further and contribute a fix, but it seems like a problem with one of the I128 arguments to helper_atomic_cmpxchgo_le
UPD: Issue is also in master (as of caa9cbd566877b34e9abcc04d936116fc5e0ab28
)
Steps to reproduce
N/A
Additional information
Thread 9 received signal SIGSEGV, Segmentation fault.
0x00007ff67efc32dc in helper_atomic_cmpxchgo_le (env=0x24796b08c10, addr=18446684150325987376, oldv=46236672343829145701101521005152, newv=2595395441251766838621186119693696, oi=3650) at ../accel/tcg/atomic_common.c.inc:60
60 CMPXCHG_HELPER(cmpxchgo_le, Int128)
(gdb) bt
#0 0x00007ff67efc32dc in helper_atomic_cmpxchgo_le (env=0x24796b08c10,
addr=18446684150325987376, oldv=46236672343829145701101521005152,
newv=2595395441251766838621186119693696, oi=3650) at ../accel/tcg/atomic_common.c.inc:60
#1 0x00000247a124f73d in ?? ()
Edited by Evgeny Iakovlev