On Mon, 2 Mar 2026 at 10:32, Peter Maydell <[email protected]> wrote: > > On Sun, 1 Mar 2026 at 15:15, Yodel Eldar <[email protected]> wrote: > > > > Hi, Lukas > > > > On 01/03/2026 05:13, Lukas Straub wrote: > > > > ../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 */ > > > | ^~~~~~~~~~ > > On the face of it, this looks like a compiler bug (warning false > positive)
The gcc folks noted that their documentation says: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html # Note that sanitizers tend to increase the rate of false positive # warnings, most notably those around -Wmaybe-uninitialized. We # recommend against combining -Werror and [the use of] sanitizers. I think then that I would recommend one of: * use --disable-werror * use clang, not gcc, if you want the sanitizers We could perhaps get configure to do one of: * force --disable-werror for gcc + sanitizers enabled * error out giving the above suggestions thanks -- PMM
