Floating-point exception in ide_set_sector
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
QEMU |
Fix Released
|
Undecided
|
John Snow |
Bug Description
Hello,
Here is a reproducer:
cat << EOF | ./i386-
-qtest null -nographic -vga qxl -qtest stdio -nodefaults\
-drive if=none,
-drive if=none,
-device ide-cd,drive=drive0 -device ide-hd,drive=drive1
outw 0x176 0x3538
outl 0xcf8 0x80000903
outl 0xcfc 0x184275c
outb 0x376 0x2f
outb 0x376 0x0
outw 0x176 0xa1a4
outl 0xcf8 0x80000920
outb 0xcfc 0xff
outb 0xf8 0x9
EOF
The stack-trace:
==16513==ERROR: UndefinedBehavi
#0 0x556783603fdc in ide_set_sector /home/alxndr/
#1 0x556783603fdc in ide_dma_cb /home/alxndr/
#2 0x55678349d74d in dma_complete /home/alxndr/
#3 0x55678349d74d in dma_blk_cb /home/alxndr/
#4 0x556783962f25 in blk_aio_complete /home/alxndr/
#5 0x556783962f25 in blk_aio_complete_bh /home/alxndr/
#6 0x556783ac030f in aio_bh_call /home/alxndr/
#7 0x556783ac030f in aio_bh_poll /home/alxndr/
#8 0x556783a9a863 in aio_dispatch /home/alxndr/
#9 0x556783ac1b4c in aio_ctx_dispatch /home/alxndr/
#10 0x7f4f1c0fe9ed in g_main_
#11 0x556783acdccb in glib_pollfds_poll /home/alxndr/
#12 0x556783acdccb in os_host_
#13 0x556783acdccb in main_loop_wait /home/alxndr/
#14 0x5567833613e5 in qemu_main_loop /home/alxndr/
#15 0x556783a07a4d in main /home/alxndr/
#16 0x7f4f1ac84e0a in __libc_start_main /build/
#17 0x5567830a9089 in _start (/home/
With -trace ide*
12163@159458551
[R +0.024963] outw 0x176 0x3538
12163@159458551
12163@159458551
12163@159458551
OK
[S +0.025002] OK
[R +0.025012] outl 0xcf8 0x80000903
OK
[S +0.025018] OK
[R +0.025026] outl 0xcfc 0x184275c
OK
[S +0.025210] OK
[R +0.025219] outb 0x376 0x2f
12163@159458551
OK
[S +0.025229] OK
[R +0.025234] outb 0x376 0x0
12163@159458551
OK
[S +0.025240] OK
[R +0.025246] outw 0x176 0xa1a4
12163@159458551
12163@159458551
12163@159458551
OK
[S +0.025265] OK
[R +0.025270] outl 0xcf8 0x80000920
OK
[S +0.025274] OK
[R +0.025279] outb 0xcfc 0xff
OK
[S +0.025443] OK
[R +0.025451] outb 0xf8 0x9
12163@159458551
OK
[S +0.025724] OK
UndefinedBehavi
==12163==ERROR: UndefinedBehavi
-Alex
On 200712 2025, Alexander Bulekov wrote: softmmu/ qemu-system- i386 -M pc,accel=qtest\ id=drive0, file=null- co://,file. read-zeroes= on,format= raw\ id=drive1, file=null- co://,file. read-zeroes= on,format= raw\ orSanitizer: FPE on unknown address 0x556783603fdc (pc 0x556783603fdc bp 0x7fff82143b10 sp 0x7fff82143ab0 T16513) Development/ qemu/hw/ ide/core. c:626:26 Development/ qemu/hw/ ide/core. c:883:9 Development/ qemu/dma- helpers. c:120:9 Development/ qemu/dma- helpers. c:138:9 Development/ qemu/block/ block-backend. c:1402: 9 Development/ qemu/block/ block-backend. c:1412: 5 Development/ qemu/util/ async.c: 136:5 Development/ qemu/util/ async.c: 164:13 Development/ qemu/util/ aio-posix. c:380:5 Development/ qemu/util/ async.c: 306:5 context_ dispatch (/usr/lib/ x86_64- linux-gnu/ libglib- 2.0.so. 0+0x4e9ed) Development/ qemu/util/ main-loop. c:219:9 main_loop_ wait /home/alxndr/ Development/ qemu/util/ main-loop. c:242:5 Development/ qemu/util/ main-loop. c:518:11 Development/ qemu/softmmu/ vl.c:1664: 9 Development/ qemu/softmmu/ main.c: 49:5 glibc-GwnBeO/ glibc-2. 30/csu/ ../csu/ libc-start. c:308:16 alxndr/ Development/ qemu/build/ i386-softmmu/ qemu-system- i386+0x7d2089) 6.671265: ide_reset IDEstate 0x56162a269058 6.673676: ide_ioport_ write IDE PIO wr @ 0x176 (Device/Head); val 0x38; bus 0x56162a268c00 IDEState 0x56162a268c88 6.673683: ide_ioport_ write IDE PIO wr @ 0x177 (Command); val 0x35; bus 0x56162a268c00 IDEState 0x56162a269058 6.673686: ide_exec_ cmd IDE exec cmd: bus 0x56162a268c00; state 0x56162a269058; cmd 0x35
> Public bug reported:
>
> Hello,
> Here is a reproducer:
> cat << EOF | ./i386-
> -qtest null -nographic -vga qxl -qtest stdio -nodefaults\
> -drive if=none,
> -drive if=none,
> -device ide-cd,drive=drive0 -device ide-hd,drive=drive1
> outw 0x176 0x3538
> outl 0xcf8 0x80000903
> outl 0xcfc 0x184275c
> outb 0x376 0x2f
> outb 0x376 0x0
> outw 0x176 0xa1a4
> outl 0xcf8 0x80000920
> outb 0xcfc 0xff
> outb 0xf8 0x9
> EOF
>
> The stack-trace:
> ==16513==ERROR: UndefinedBehavi
> #0 0x556783603fdc in ide_set_sector /home/alxndr/
> #1 0x556783603fdc in ide_dma_cb /home/alxndr/
> #2 0x55678349d74d in dma_complete /home/alxndr/
> #3 0x55678349d74d in dma_blk_cb /home/alxndr/
> #4 0x556783962f25 in blk_aio_complete /home/alxndr/
> #5 0x556783962f25 in blk_aio_complete_bh /home/alxndr/
> #6 0x556783ac030f in aio_bh_call /home/alxndr/
> #7 0x556783ac030f in aio_bh_poll /home/alxndr/
> #8 0x556783a9a863 in aio_dispatch /home/alxndr/
> #9 0x556783ac1b4c in aio_ctx_dispatch /home/alxndr/
> #10 0x7f4f1c0fe9ed in g_main_
> #11 0x556783acdccb in glib_pollfds_poll /home/alxndr/
> #12 0x556783acdccb in os_host_
> #13 0x556783acdccb in main_loop_wait /home/alxndr/
> #14 0x5567833613e5 in qemu_main_loop /home/alxndr/
> #15 0x556783a07a4d in main /home/alxndr/
> #16 0x7f4f1ac84e0a in __libc_start_main /build/
> #17 0x5567830a9089 in _start (/home/
>
> With -trace ide*
>
> 12163@159458551
> [R +0.024963] outw 0x176 0x3538
> 12163@159458551
> 12163@159458551
> 12163@159458551
> OK
> [S +0.025002] OK
> [R +0.025012] outl 0xcf8 0x80000903
> OK
> [S +0.025018] OK
> [R +0.025026] outl 0xcfc 0x184275c
> OK
> [S +0.025210] OK
> [R +0.025219] outb 0x376 0x2f
> 12163@159458551...