From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3B8B43858C39; Thu, 16 Sep 2021 09:59:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B8B43858C39 From: "dac324 at yahoo dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/102361] New: Errors compiling Linux kernel 5.14.4 with CONFIG_FORTIFY=y Date: Thu, 16 Sep 2021 09:59:51 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Version: 12.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: dac324 at yahoo dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Sep 2021 09:59:51 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D102361 Bug ID: 102361 Summary: Errors compiling Linux kernel 5.14.4 with CONFIG_FORTIFY=3Dy Product: gcc Version: 12.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: dac324 at yahoo dot de Target Milestone: --- GCC version: gcc (GCC) 12.0.0 20210910 (experimental) With this version, it is not possible to compile the Linux kernel sources (tested with both 5.14.1 and 5.14.4).=20 Problem is that GCC 12 conflicts with CONFIG_FORTIFY=3Dy. Errors thrown with the 5.14.1 kernel sources: In function 'memset', inlined from 'init_rock_state.part.0' at fs/isofs/rock.c:74:2: ./include/linux/fortify-string.h:172:17: error: call to '__write_overflow' declared with attribute error: detected write beyond size of object passed = as 1st parameter 172 | __write_overflow(); | ^~~~~~~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:271: fs/isofs/rock.o] Error 1 make[1]: *** [scripts/Makefile.build:514: fs/isofs] Error 2 In function 'memcpy', inlined from 'tl_to_darg.part.0' at fs/ext4/fast_commit.c:1295:2: ./include/linux/fortify-string.h:187:25: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter 187 | __read_overflow2(); | ^~~~~~~~~~~~~~~~~~ make[2]: *** [scripts/Makefile.build:271: fs/ext4/fast_commit.o] Error 1 make[1]: *** [scripts/Makefile.build:514: fs/ext4] Error 2 Error thrown with the 5.14.4 kernel sources: In Function =C2=BBmemcpy=C2=AB, inserted from von =C2=BBtl_to_darg.part.0=C2=AB bei fs/ext4/fast_commit= .c:1295:2: ./include/linux/fortify-string.h:187:25: Error: call to =C2=BB__read_overfl= ow2=C2=AB declared with attribute error: detected read beyond size of object passed as 2nd parameter 187 | __read_overflow2(); | ^~~~~~~~~~~~~~~~~~ With GCC 11, these errors do not occur. Hence, I must assume that they are related to the compiler version.=