public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "dac324 at yahoo dot de" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-102361-4@http.gcc.gnu.org/bugzilla/> (raw)

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102361

            Bug ID: 102361
           Summary: Errors compiling Linux kernel 5.14.4 with
                    CONFIG_FORTIFY=y
           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). 

Problem is that GCC 12 conflicts with CONFIG_FORTIFY=y.

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 »memcpy«,
    inserted from von »tl_to_darg.part.0« bei 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();
      |                         ^~~~~~~~~~~~~~~~~~


With GCC 11, these errors do not occur. Hence, I must assume that they are
related to the compiler version.

             reply	other threads:[~2021-09-16  9:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-16  9:59 dac324 at yahoo dot de [this message]
2021-09-16 10:38 ` [Bug c/102361] " marxin at gcc dot gnu.org
2021-09-16 12:34 ` dac324 at yahoo dot de
2021-09-16 12:36 ` jakub at gcc dot gnu.org
2021-09-16 13:29 ` dac324 at yahoo dot de
2021-09-16 13:29 ` dac324 at yahoo dot de
2021-09-16 13:41 ` dac324 at yahoo dot de
2021-09-16 13:42 ` dac324 at yahoo dot de
2021-09-16 13:45 ` dac324 at yahoo dot de
2021-09-16 22:57 ` [Bug middle-end/102361] " pinskia at gcc dot gnu.org
2021-09-16 22:57 ` pinskia at gcc dot gnu.org
2021-09-16 22:59 ` [Bug ipa/102361] " pinskia at gcc dot gnu.org
2021-09-16 22:59 ` pinskia at gcc dot gnu.org
2021-09-16 23:00 ` pinskia at gcc dot gnu.org
2021-09-17  7:24 ` [Bug ipa/102361] Errors compiling Linux kernel 5.14 " dac324 at yahoo dot de
2021-09-17  7:41 ` pinskia at gcc dot gnu.org
2022-01-18 10:36 ` pinskia at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-102361-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).