Floating-point-exception in rtl8139_cplus_transmit_one
Hello,
Reproducer
cat << EOF | ./qemu-system-i386 -display none -machine accel=qtest, -m \
512M,slots=1,maxmem=0xffff000000000000 -machine q35 -nodefaults -device \
rtl8139,netdev=net0 -netdev user,id=net0 -device \
pc-dimm,id=nv1,memdev=mem1,addr=0xb800a64602800000 -object \
memory-backend-ram,id=mem1,size=2M -qtest stdio
outl 0xcf8 0x80000814
outl 0xcfc 0xe0000000
outl 0xcf8 0x80000804
outw 0xcfc 0x06
write 0xe0000037 0x1 0x04
write 0xe00000e0 0x2 0x01
write 0x1 0x1 0x04
write 0x3 0x1 0x98
write 0xa 0x1 0x8c
write 0xb 0x1 0x02
write 0xc 0x1 0x46
write 0xd 0x1 0xa6
write 0xf 0x1 0xb8
write 0xb800a646028c000c 0x1 0x08
write 0xb800a646028c000e 0x1 0x47
write 0xb800a646028c0010 0x1 0x02
write 0xb800a646028c0017 0x1 0x06
write 0xb800a646028c0036 0x1 0x80
write 0xe00000d9 0x1 0x40
EOF
Stack-Trace
==2099830==ERROR: UndefinedBehaviorSanitizer: FPE on unknown address 0x559abbdcf73f (pc 0x559abbdcf73f bp 0x7ffea8505720 sp 0x7ffea8505550 T2099830)
#0 0x559abbdcf73f in rtl8139_cplus_transmit_one /home/alxndr/Development/qemu/build/../hw/net/rtl8139.c:2248:60
#1 0x559abbdcf73f in rtl8139_cplus_transmit /home/alxndr/Development/qemu/build/../hw/net/rtl8139.c:2363:28
#2 0x559abbdcd8b5 in rtl8139_io_writel /home/alxndr/Development/qemu/build/../hw/net/rtl8139.c:2903:13
#3 0x559abbdcd8b5 in rtl8139_ioport_write /home/alxndr/Development/qemu/build/../hw/net/rtl8139.c:3289:9
#4 0x559abc11dbf8 in memory_region_write_accessor /home/alxndr/Development/qemu/build/../softmmu/memory.c:493:5
#5 0x559abc11da54 in access_with_adjusted_size /home/alxndr/Development/qemu/build/../softmmu/memory.c:555:18
#6 0x559abc11da54 in memory_region_dispatch_write /home/alxndr/Development/qemu/build/../softmmu/memory.c:1515:16
OSS-Fuzz Report: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55033
libqtest Reproducer: 55033.c
Thank you