Skip to content

QEMU v8.0.0 crashes when running in TCG mode on windows OS

Host environment

  • Operating system: Windows 10 22H2
  • OS/kernel version: NA
  • Architecture: x86_64
  • QEMU flavor: qemu-system-aarch64
  • QEMU version: v8.0.0
  • QEMU command line:
    qemu-system-aarch64.exe -M virt -cpu cortex-a53 -smp 4 -m 1G -nographic -serial mon:stdio -kernel Image -initrd rootfs.cpio.lz4 -append console=ttyAMA0

Emulated/Virtualized environment

  • Operating system: linux buildroot
  • OS/kernel version: linux-6.1.12
  • Architecture: arm64

Description of problem

This bug is a follow-up to issue #1581 (closed). After the patch 7d9e1ee4 is merged, QEMU segfaults at startup. And the location where the segfault occurs here(from coredump):

atomic_common.c.inc:60
CMPXCHG_HELPER(cmpxchgo_le, Int128)

Steps to reproduce

NA

Additional information

  1. This problem only occurs when the host system is windows, and the same QEMU configuration does not have this problem when the host system is Linux.
  2. This problem is related to the -smp parameter of QEMU. If the smp parameter is 1, this problem will not occur.
  3. This problem does not exist in the QEMU version 7.2.
  4. What is even more confusing is that if you use gdb to load qemu and run it, this issue cannot be reproduced.
Edited by li xingyuan
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information