Using gcc-12.1.1_pre20220514: (...) [BUILD] bin/interface.o In file included from include/string.h:23, from include/ipxe/uaccess.h:25, from core/acpi.c:28: In function ‘__constant_memcpy’, inlined from ‘memcpy’ at arch/x86/include/bits/string.h:168:10, inlined from ‘trivial_memcpy_user’ at include/ipxe/uaccess.h:109:2, inlined from ‘memcpy_user’ at arch/x86/include/librm.h:155:2, inlined from ‘copy_from_user’ at include/ipxe/uaccess.h:338:2, inlined from ‘acpi_sx_zsdt’ at core/acpi.c:220:3: arch/x86/include/bits/string.h:79:32: error: array subscript ‘union <anonymous>[0]’ is partly outside array bounds of ‘union <anonymous>[1]’ [-Werror=array-bounds] 79 | dest_u->u32[0] = src_u->u32[0]; | ~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~ core/acpi.c: In function ‘acpi_sx_zsdt’: core/acpi.c:194:11: note: object ‘buf’ of size 4 194 | } buf; | ^~~ [BUILD] bin/iobuf.o [BUILD] bin/iomap_virt.o [BUILD] bin/isqrt.o [BUILD] bin/job.o [BUILD] bin/linebuf.o [BUILD] bin/lineconsole.o [BUILD] bin/list.o [BUILD] bin/log.o [BUILD] bin/main.o [BUILD] bin/malloc.o (...) Reproducible: Always
Created attachment 779282 [details] build.log.gz
Created attachment 779285 [details] emerge-info.txt
It seems Fedora is handling this by setting this warning as non-fatal: https://src.fedoraproject.org/rpms/xen/blob/rawhide/f/xen.gcc12.fixes.patch $(call cc-option-add,CFLAGS,CC,-Wno-error=array-bounds)
Should have taken a closer look because that patch does not fix the error logged. Also, seems like we're maintaining a patchset out-of-tree so I can't really help there.
ping
The errors origin in ("bundled") ipxe. I am not sure what the best course of action is. I think that the current version of sys-firmware/ipxe 1.21.1 should be also affected by this, because it appears to be even older than the Xen version (1.21.1 is from 2020-12-31, the Xen version 3c040ad, is from 2021-06-11). We could try to apply upstream commit 02ec659b73b0 ("[acpi] Generalise DSDT/SSDT data extraction logic"), that looks like it could at least fix one error.
FYI, ipxe-1.21.1[*,-binary] compiles just fine with gcc-12.2.9999 (May 30th version)
(In reply to Kobboi from comment #7) > FYI, ipxe-1.21.1[*,-binary] compiles just fine with gcc-12.2.9999 (May 30th > version) Try removing the "export NO_WERROR=1" [1] in the ebuild's src_compile() phase. Then it will fail with the same errors. 1: https://github.com/gentoo/gentoo/blob/1c040cb550fa6ab596ec2297f47113d7a4fd90a4/sys-firmware/ipxe/ipxe-1.21.1.ebuild#L78
With some luck, GCC 12 will be unleashed in ~arch around Sunday. If a bug gets fixed upstream.
(In reply to Sam James from comment #9) > With some luck, GCC 12 will be unleashed in ~arch around Sunday. If a bug > gets fixed upstream. ping