QEMU crash after a QuickBASIC program integer overflow
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Expired
|
Undecided
|
Unassigned |
Bug Description
A trivial program compiled with QuickBASIC 4.5 with integer overflow will crash QEMU when ran under MS-DOS 5.0 or FreeDOS 1.2:
C:\KILLER>type killer.bas
A% = VAL("99999"):PRINT A%
C:\KILLER>
**
ERROR:
Aborted
QEMU version v5.2, compiler for ARM, and started with command line:
qemu-system-i386 -curses -cpu 486 -m 1 -drive dos.img
The same test under Ubuntu QEMU and KVM/x86_64 (QEMU emulator version 4.2.1 (Debian 1:4.2-3ubuntu6.14)) will just silently hang the QEMU. On DOSBOX, the machine does not die and program outputs the value -31073.
The EXE to reproduce the issue is attached.
description: | updated |
Changed in qemu: | |
status: | New → Confirmed |
tags: | added: i386 tcg |
The program works (in TCQ mode) with QEMU v5.0.0.
QEMU starts crashing with the commit:
commit 975af797f1e04e4 d1b1a12f1731141 d3770fdbce
Author: Joseph Myers <email address hidden>
Date: Fri May 15 21:21:24 2020 +0000
target/i386: fix IEEE x87 floating-point exception raising