From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 3B0353870843; Wed, 29 Jul 2020 12:43:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3B0353870843 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1596026580; bh=cQyjl/NwGakoTwzcJeleMG7LF9HM89cqHe5JbfzkPdA=; h=From:To:Subject:Date:From; b=gq+mORkMIVoJMIw4j4HJQWo/qErmnVHB4jpB/HaRsH4ohF1Cz8lDP29PQJ9S4DQzf EPhx3e9VTGMhp54SDGhdlmSVuMcd5e33sX0xWDdCuLv5qbu3xcCliI2ve7nnZQx/RH qXcjqI59QoPfZpdGYNwaj+zb8CKXV0x3MJB6EJvc= From: "andrea.righi at canonical dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/96367] New: bogus format truncation error on armhf when building perf with gcc 10 Date: Wed, 29 Jul 2020 12:43:00 +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: 10.2.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: andrea.righi at canonical dot com 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: Wed, 29 Jul 2020 12:43:00 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D96367 Bug ID: 96367 Summary: bogus format truncation error on armhf when building perf with gcc 10 Product: gcc Version: 10.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c Assignee: unassigned at gcc dot gnu.org Reporter: andrea.righi at canonical dot com Target Milestone: --- After moving to gcc-10 (in Ubuntu Groovy) we're getting an error during the perf build (only on the armhf architecture) when compiling the Linux kernel: util/map.c:124:5: error: =E2=80=98%s=E2=80=99 directive output may be= truncated writing between 1 and 2147483645 bytes into a region of size 4096 [-Werror=3Dformat-truncation=3D] Source code: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/groovy/t= ree/tools/perf/util/map.c?h=3Dmaster-next#n117 Looking at the source code it seems to be a false positive: the snprintf() should never exceed the size of 4096 as reported by the error (the new leng= th is checked immediately before calling snprintf). Moreover, it is quite strange that we are getting this error only on armhf.= At least I'm expecting to get this error across all architectures and not just armhf. Do you think it's a bug or am I missing something obvious? Thanks!=