graphic: 0.916 device: 0.821 semantic: 0.803 performance: 0.771 virtual: 0.732 user-level: 0.718 debug: 0.697 PID: 0.673 network: 0.666 architecture: 0.661 arm: 0.648 kernel: 0.590 vnc: 0.573 assembly: 0.547 permissions: 0.497 socket: 0.482 hypervisor: 0.476 ppc: 0.474 files: 0.434 risc-v: 0.418 peripherals: 0.400 register: 0.393 boot: 0.371 VMM: 0.368 TCG: 0.339 mistranslation: 0.312 x86: 0.242 i386: 0.170 KVM: 0.081 Qemu crashes with SIGFPE on certain trapping arithmetic operations on m68k target Description of problem: I recently ported NetBSD to the Qemu m68k "virt" platform, and this was discovered when running NetBSD's automated tests. Certain arithmetic operation that will trap in the guest will crash Qemu. First case encountered is below. Steps to reproduce: 1. Compile and run the following program in the m68k guest: ``` virt68k:thorpej 3$ cat crash-qemu.c #include #include int divisor = -1; int main(int argc, char *argv[]) { if (argc > 1) divisor = atoi(argv[1]); return INT_MIN / divisor; } virt68k:thorpej 4$ ``` Another minimal case would be: ``` move.l #-2147483648,%d0 move.l #-1,%d1 divsl.l %d1,%d1:%d0 ``` Additional information: