qemu-system-m68k segfaults on opcode 0x4848
Host environment
-
Operating system: Ubuntu 22.10
-
OS/kernel version: Linux skylake 5.19.0-1015-lowlatency #16-Ubuntu SMP PREEMPT_DYNAMIC Thu Jan 5 20:11:09 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
-
Architecture: x86-64
-
QEMU flavor: qemu-system-m68k
-
QEMU version: QEMU emulator version 7.0.0 (Debian 1:7.0+dfsg-7ubuntu2.1)
-
QEMU command line: qemu-system-m68k -boot c -M q800 -serial none -serial mon:stdio -m 1000M -net nic,model=dp83932,addr=08:00:07:12:34:89 -net user -append "root=/dev/sda2 rw console=ttyS0 console=tty" -kernel virt/vmlinux-4.16.0-1-m68k -initrd virt/initrd.img-4.16.0-1-m68k -drive file=virt/debian-m68k-deb10.qcow2,format=qcow2 -nographic
cat oops.c
int main(void)
{
__asm__ __volatile__(".byte 0x48, 0x48");
return 0;
}
cking@debian-m68k:~$ gcc oops.c
cking@debian-m68k:~$ ./a.out
./debian-m68k.sh: line 10: 4420 Segmentation fault (core dumped) qemu-system-m68k -boot c -M q800 -serial none -serial mon:stdio -m 1000M -net nic,model=dp83932,addr=08:00:07:12:34:89 -net user -append "root=/dev/sda2 rw console=ttyS0 console=tty" -kernel virt/vmlinux-4.16.0-1-m68k -initrd virt/initrd.img-4.16.0-1-m68k -drive file=virt/debian-m68k-deb10.qcow2,format=qcow2 -nographic
Emulated/Virtualized environment
-
Operating system: Debian m68k bookworm
-
OS/kernel version: Linux debian-m68k 4.16.0-1-m68k #1 Debian 4.16.5-1 (2018-04-29) m68k GNU/Linux
-
Architecture: m68k
Description of problem
Running an m68k executable with opcode 0x4848 will segfault qemu-system-m68k
Steps to reproduce
- Boot m68k debian
- Compile program (see above for the oops.c source) that executes opcode 0x4848
- Run program
- QEMU segfaults:
./debian-m68k.sh: line 10: 4420 Segmentation fault (core dumped) qemu-system-m68k -boot c -M q800 -serial none -serial mon:stdio -m 1000M -net nic,model=dp83932,addr=08:00:07:12:34:89 -net user -append "root=/dev/sda2 rw console=ttyS0 console=tty" -kernel virt/vmlinux-4.16.0-1-m68k -initrd virt/initrd.img-4.16.0-1-m68k -drive file=virt/debian-m68k-deb10.qcow2,format=qcow2 -nographic