https://gcc.gnu.org/bugzilla/show_bug.cgi?id=117912
Bug ID: 117912 Summary: Linux Kernel 6.13-rc1 Build Failure: 'Detected write beyond size of object' Product: gcc Version: 14.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: laoar.shao at gmail dot com Target Milestone: --- Created attachment 59787 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=59787&action=edit kernel config GCC version: 14.2.0 Linux Kernel Version: 6.13-rc1 [0] Kernel Config: Attached. We recently encountered the following build failure with the latest Linux Kernel: CC kernel/time/tick-broadcast.o In file included from /work/build/trace/nobackup/linux-test.git/include/linux/string.h:390, from /work/build/trace/nobackup/linux-test.git/include/linux/bitmap.h:13, from /work/build/trace/nobackup/linux-test.git/include/linux/cpumask.h:12, from /work/build/trace/nobackup/linux-test.git/include/linux/smp.h:13, from /work/build/trace/nobackup/linux-test.git/include/linux/lockdep.h:14, from /work/build/trace/nobackup/linux-test.git/include/linux/spinlock.h:63, from /work/build/trace/nobackup/linux-test.git/include/linux/wait.h:9, from /work/build/trace/nobackup/linux-test.git/include/linux/wait_bit.h:8, from /work/build/trace/nobackup/linux-test.git/include/linux/fs.h:6, from /work/build/trace/nobackup/linux-test.git/kernel/auditsc.c:37: In function ‘sized_strscpy’, inlined from ‘__audit_ptrace’ at /work/build/trace/nobackup/linux-test.git/kernel/auditsc.c:2732:2: /work/build/trace/nobackup/linux-test.git/include/linux/fortify-string.h:293:17: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object (1st parameter) 293 | __write_overflow(); | ^~~~~~~~~~~~~~~~~~ CC arch/x86/kernel/tracepoint.o In function ‘sized_strscpy’, inlined from ‘audit_signal_info_syscall’ at /work/build/trace/nobackup/linux-test.git/kernel/auditsc.c:2759:3: /work/build/trace/nobackup/linux-test.git/include/linux/fortify-string.h:293:17: error: call to ‘__write_overflow’ declared with attribute error: detected write beyond size of object (1st parameter) 293 | __write_overflow(); | ^~~~~~~~~~~~~~~~~~ AR drivers/nvmem/built-in.a make[4]: *** [/work/build/trace/nobackup/linux-test.git/scripts/Makefile.build:229: kernel/auditsc.o] Error 1 It seems there may be an issue with GCC. After searching the GCC bug tracker, I found some similar reports, such as Bug 101941 [1]. However, since Bug 101941 was resolved in GCC-12.1, this appears to be a new or related issue. It’s worth noting that this problem can be temporarily addressed with a code adjustment [2], which might help in investigating the root cause more effectively. [0] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/ [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101941 [2] https://lore.kernel.org/audit/20241203060350.69472-1-laoar.s...@gmail.com/