public inbox for elfutils@sourceware.org
 help / color / mirror / Atom feed
From: "mliska at suse dot cz" <sourceware-bugzilla@sourceware.org>
To: elfutils-devel@sourceware.org
Subject: [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3
Date: Mon, 26 Sep 2022 08:04:35 +0000	[thread overview]
Message-ID: <bug-29614-10460@http.sourceware.org/bugzilla/> (raw)

https://sourceware.org/bugzilla/show_bug.cgi?id=29614

            Bug ID: 29614
           Summary: Fails to build with GCC master + -D_FORTIFY_SOURCE=3
           Product: elfutils
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general
          Assignee: unassigned at sourceware dot org
          Reporter: mliska at suse dot cz
                CC: elfutils-devel at sourceware dot org, mjw at fedoraproject dot org
  Target Milestone: ---

Fails due to:

[   96s] In file included from /usr/include/ar.h:22,
[   96s]                  from ../libelf/libelfP.h:33,
[   96s]                  from core-file.c:31:
[   96s] In function 'pread',
[   96s]     inlined from 'pread_retry' at ../lib/system.h:188:21,
[   96s]     inlined from 'elf_begin_rand' at core-file.c:86:16,
[   96s]     inlined from 'core_file_read_eagerly' at core-file.c:205:15:
[   96s] /usr/include/bits/unistd.h:74:10: error: '*pread' writing 58 or more
bytes into a region of size 10 overflows the destination
[-Werror=stringop-overflow=]
[   96s]    74 |   return __glibc_fortify (pread, __nbytes, sizeof (char),
[   96s]       |          ^~~~~~~~~~~~~~~
[   96s] /usr/include/ar.h: In function 'core_file_read_eagerly':
[   96s] /usr/include/ar.h:41:10: note: destination object 'ar_size' of size 10
[   96s]    41 |     char ar_size[10];           /* File size, in ASCII
decimal.  */
[   96s]       |          ^~~~~~~
[   96s] /usr/include/bits/unistd.h:50:16: note: in a call to function '*pread'
declared with attribute 'access (write_only, 2, 3)'
[   96s]    50 | extern ssize_t __REDIRECT (__pread_alias,
[   96s]       |                ^~~~~~~~~~
[   96s] cc1: all warnings being treated as errors
[   96s] make[2]: *** [Makefile:711: core-file.o] Error 1
[   96s] make[2]: *** Waiting for unfinished jobs....

which is likely a false positive of the warning. Note the warning is quite
known for its false positives.

Can you please take a look?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

             reply	other threads:[~2022-09-26  8:04 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-26  8:04 mliska at suse dot cz [this message]
2022-09-26  8:36 ` [Bug general/29614] " mliska at suse dot cz
2022-09-26 10:12 ` mark at klomp dot org
2022-09-26 10:35 ` mliska at suse dot cz
2022-09-26 11:50 ` mark at klomp dot org
2022-09-26 11:57 ` mliska at suse dot cz
2022-09-26 19:17 ` mliska at suse dot cz

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-29614-10460@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=elfutils-devel@sourceware.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).