public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "andrea.righi at canonical dot com" <gcc-bugzilla@gcc.gnu.org> 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 [thread overview] Message-ID: <bug-96367-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96367 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: ‘%s’ directive output may be truncated writing between 1 and 2147483645 bytes into a region of size 4096 [-Werror=format-truncation=] Source code: https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/groovy/tree/tools/perf/util/map.c?h=master-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 length 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!
next reply other threads:[~2020-07-29 12:43 UTC|newest] Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-29 12:43 andrea.righi at canonical dot com [this message] 2020-07-29 16:15 ` [Bug tree-optimization/96367] bogus -Wformat-truncation in ILP32 msebor at gcc dot gnu.org 2022-01-19 17:42 ` msebor at gcc dot gnu.org 2022-09-11 21:39 ` zfigura at codeweavers dot com 2022-09-11 21:40 ` zfigura at codeweavers dot com
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-96367-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: linkBe 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).