From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id B4F183858CDA; Mon, 26 Sep 2022 11:57:26 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B4F183858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1664193446; bh=wEtLO9l7b4QuH5MLS3z3So21NAKkn0vvN4XeToz82Yw=; h=From:To:Subject:Date:In-Reply-To:References:From; b=SLUpTs2dVm1UCUhZipzjVU8ZsRuUBjKjRxB81ZTJY4o9FiKEgJphdJpLM9eFSmf8A T7+j+zAO3P6MZfVU0j6/Z77WPBC4f15GUz4uxmyls4nK8jv5ie6xqXTX0G6pdZUp6Y BsaKd/yX3Ia2ArzeMRKs8A7IELnup4DAhdXEqyLc= From: "mliska at suse dot cz" To: elfutils-devel@sourceware.org Subject: [Bug general/29614] Fails to build with GCC master + -D_FORTIFY_SOURCE=3 Date: Mon, 26 Sep 2022 11:57:26 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: general X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mliska at suse dot cz X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D29614 --- Comment #5 from Martin Liska --- Am using the current master of both GCC and Glibc library: [ 96s] gcc -D_GNU_SOURCE -DHAVE_CONFIG_H -DLOCALEDIR=3D'"/usr/share/local= e"' -I. -I.. -I. -I. -I../lib -I.. -I. -I./../libelf -I./../libebl -I./../libdw -I./../libdwelf -I./../debuginfod -std=3Dgnu99 -Wall -Wshadow -Wformat=3D2 -Wold-style-definition -Wstrict-prototypes -Wtrampolines -Wlogical-op -Wduplicated-cond -Wnull-dereference -Wimplicit-fallthrough=3D5 -Werror -Wu= nused -Wextra -Wstack-usage=3D262144 -O2 -Wall -U_FORTIFY_SOURCE -D_FORTIFY_SOU= RCE=3D3 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=3Dreturn-type -flto=3Dauto -ffat-lto-objec= ts -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 mo= re bytes into a region of size 10 overflows the destination [-Werror=3Dstringop-overflow=3D] [ 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 siz= e 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 '*pr= ead' 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.... --=20 You are receiving this mail because: You are on the CC list for the bug.=