* [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3
@ 2022-09-26 8:04 mliska at suse dot cz
2022-09-26 8:36 ` [Bug general/29614] " mliska at suse dot cz
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: mliska at suse dot cz @ 2022-09-26 8:04 UTC (permalink / raw)
To: elfutils-devel
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
@ 2022-09-26 8:36 ` mliska at suse dot cz
2022-09-26 10:12 ` mark at klomp dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mliska at suse dot cz @ 2022-09-26 8:36 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29614
Martin Liska <mliska at suse dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
See Also| |https://gcc.gnu.org/bugzill
| |a/show_bug.cgi?id=107038
--- Comment #1 from Martin Liska <mliska at suse dot cz> ---
It's likely GCC bug anyway.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
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
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mark at klomp dot org @ 2022-09-26 10:12 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29614
Mark Wielaard <mark at klomp dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mark at klomp dot org
--- Comment #2 from Mark Wielaard <mark at klomp dot org> ---
Is this with:
commit 0873ae782d14e672e8344775e76b7fca0a8b41bf
Author: Mark Wielaard <mark@klomp.org>
Date: Thu Jul 28 15:31:12 2022 +0200
libdwfl: Rewrite reading of ar_size in elf_begin_rand
Which has some discussion here:
https://inbox.sourceware.org/elfutils-devel/dfbbbbd00dc70d07950ce12de7fd20e9171f5325.camel@klomp.org/T/
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
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
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: mliska at suse dot cz @ 2022-09-26 10:35 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29614
Martin Liska <mliska at suse dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |siddhesh at sourceware dot org
--- Comment #3 from Martin Liska <mliska at suse dot cz> ---
Yes, it's with the patch, let's add Siddhesh to CC.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
` (2 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: mark at klomp dot org @ 2022-09-26 11:50 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29614
--- Comment #4 from Mark Wielaard <mark at klomp dot org> ---
OK, so, this is with current git trunk.
Which version of gcc and glibc are you using?
Could you show (make V=1) the exact gcc argument line?
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
` (3 preceding siblings ...)
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
5 siblings, 0 replies; 7+ messages in thread
From: mliska at suse dot cz @ 2022-09-26 11:57 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29614
--- Comment #5 from Martin Liska <mliska at suse dot cz> ---
Am using the current master of both GCC and Glibc library:
[ 96s] gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR='"/usr/share/locale"'
-I. -I.. -I. -I. -I../lib -I.. -I. -I./../libelf -I./../libebl -I./../libdw
-I./../libdwelf -I./../debuginfod -std=gnu99 -Wall -Wshadow -Wformat=2
-Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op
-Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=5 -Werror -Wunused
-Wextra -Wstack-usage=262144 -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=3
-fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables
-fstack-clash-protection -Werror=return-type -flto=auto -ffat-lto-objects -g -g
-c -o core-file.o core-file.c
[ 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....
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
` (4 preceding siblings ...)
2022-09-26 11:57 ` mliska at suse dot cz
@ 2022-09-26 19:17 ` mliska at suse dot cz
5 siblings, 0 replies; 7+ messages in thread
From: mliska at suse dot cz @ 2022-09-26 19:17 UTC (permalink / raw)
To: elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=29614
Martin Liska <mliska at suse dot cz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #6 from Martin Liska <mliska at suse dot cz> ---
Fixed on master, sorry that I tested that against the latest stable release and
not the current master.
--
You are receiving this mail because:
You are on the CC list for the bug.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-09-26 19:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-26 8:04 [Bug general/29614] New: Fails to build with GCC master + -D_FORTIFY_SOURCE=3 mliska at suse dot cz
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
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).