Hi, Lukas On 01/03/2026 05:13, Lukas Straub wrote:
On Ubuntu 24.04:lukas@build_colo:~/qemu$ cc --version cc (Ubuntu 13.3.0-6ubuntu2~24.04.1) 13.3.0 Copyright (C) 2023 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. lukas@build_colo:~/qemu$ ./configure --target-list=x86_64-softmmu --enable-replication --enable-docs --enable-asan lukas@build_colo:~/qemu$ ninja -C build qemu-system-x86_64 qemu-img tests/qtest/migration-test ninja: Entering directory `build' [24/564] Compiling C object libsystem.a.p/hw_net_rtl8139.c.o FAILED: libsystem.a.p/hw_net_rtl8139.c.o cc -m64 -Ilibsystem.a.p -I. -I.. -Isubprojects/dtc/libfdt -I../subprojects/dtc/libfdt -Isubprojects/libvduse -I../subprojects/libvduse -Iui -Iqapi -Itrace -Iui/shader -I/usr/include/p11-kit-1 -I/usr/include/pixman-1 -I/usr/include/libpng16 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/slirp -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -mcx16 -msse2 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -fno-strict-aliasing -fno-common -fwrapv -ftrivial-auto-var-init=zero -fzero-call-used-regs=used-gpr -fsanitize=address -fstack-protector-strong -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-security -Wformat-y2k -Wignored-qualifiers -Wimplicit-fallthrough=2 -Winit-self -Wmissing-format-attribute -Wmissing-prototypes -Wnested-externs -Wold-style-declaration -Wold-style-definition -Wredundant-decls -Wshadow=local -Wstrict-prototypes -Wtype-limits -Wundef -Wvla -Wwrite-strings -Wno-missing-include-dirs -Wno-psabi -Wno-shift-negative-value -isystem /home/lukas/qemu/linux-headers -isystem linux-headers -iquote . -iquote /home/lukas/qemu -iquote /home/lukas/qemu/include -iquote /home/lukas/qemu/host/include/x86_64 -iquote /home/lukas/qemu/host/include/generic -iquote /home/lukas/qemu/tcg/x86_64 -pthread -fPIE -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 -DNCURSES_WIDECHAR=1 -DCONFIG_SOFTMMU -DCOMPILING_SYSTEM_VS_USER -MD -MQ libsystem.a.p/hw_net_rtl8139.c.o -MF libsystem.a.p/hw_net_rtl8139.c.o.d -o libsystem.a.p/hw_net_rtl8139.c.o -c ../hw/net/rtl8139.c ../hw/net/rtl8139.c: In function ‘rtl8139_io_writeb’: ../hw/net/rtl8139.c:2264:17: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=] 2264 | memcpy(data_to_checksum, saved_ip_header + 12, 8); | ^ In file included from ../hw/net/rtl8139.c:62: /home/lukas/qemu/include/net/eth.h:50:14: note: at offset [8, 48] into destination object ‘ip_ver_len’ of size 1 50 | uint8_t ip_ver_len; /* version and header length */ | ^~~~~~~~~~ ../hw/net/rtl8139.c:2192:21: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=] 2192 | memcpy(data_to_checksum, saved_ip_header + 12, 8); | ^ /home/lukas/qemu/include/net/eth.h:50:14: note: at offset [8, 48] into destination object ‘ip_ver_len’ of size 1 50 | uint8_t ip_ver_len; /* version and header length */ | ^~~~~~~~~~ ../hw/net/rtl8139.c:2192:21: error: writing 8 bytes into a region of size 0 [-Werror=stringop-overflow=] 2192 | memcpy(data_to_checksum, saved_ip_header + 12, 8); | ^ /home/lukas/qemu/include/net/eth.h:50:14: note: at offset [8, 48] into destination object ‘ip_ver_len’ of size 1 50 | uint8_t ip_ver_len; /* version and header length */ | ^~~~~~~~~~ In file included from /home/lukas/qemu/include/system/memory.h:21, from /home/lukas/qemu/include/hw/pci/pci.h:4, from /home/lukas/qemu/include/hw/pci/pci_device.h:4, from ../hw/net/rtl8139.c:54: In function ‘stl_he_p’, inlined from ‘stl_be_p’ at /home/lukas/qemu/include/qemu/bswap.h:371:5, inlined from ‘rtl8139_cplus_transmit_one’ at ../hw/net/rtl8139.c:2244:21, inlined from ‘rtl8139_cplus_transmit’ at ../hw/net/rtl8139.c:2345:28, inlined from ‘rtl8139_io_writeb’ at ../hw/net/rtl8139.c:2728:17: /home/lukas/qemu/include/qemu/bswap.h:284:5: error: writing 4 bytes into a region of size 0 [-Werror=stringop-overflow=] 284 | __builtin_memcpy(ptr, &v, sizeof(v)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/lukas/qemu/include/net/eth.h: In function ‘rtl8139_io_writeb’: /home/lukas/qemu/include/net/eth.h:50:14: note: at offset [24, 64] into destination object ‘ip_ver_len’ of size 1 50 | uint8_t ip_ver_len; /* version and header length */ | ^~~~~~~~~~ cc1: all warnings being treated as errors [37/564] Compiling C object libsystem.a.p/hw_pci_pci.c.o ninja: build stopped: subcommand failed.
Thanks for the report. As a workaround, configuring the build with `--disable-werror` may avoid the stringop-overflow error, though it doesn't resolve the underlying problem. Also, there's a GitLab issue that's tracking it: https://gitlab.com/qemu-project/qemu/-/issues/3006 Regards, Yodel
