linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* File bench/numa.c compiler error on s390
@ 2022-05-16  7:24 Thomas Richter
  2022-05-16 12:51 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Richter @ 2022-05-16  7:24 UTC (permalink / raw)
  To: linux-perf-use., arnaldo Carvalho de Melo

Hi all,

I just upgraded to Fedora 36 and gcc version 12.0.1 20220308 (Red Hat 12.0.1-0) (GCC) 
and run into this compiler error:
CC      bench/numa.o
bench/numa.c: In function ‘__bench_numa’:
bench/numa.c:1749:81: error: ‘%d’ directive output may be truncated writing between 1 and 11
 bytes into a region of size between 10 and 20 [-Werror=format-truncation=]
 1749 |           snprintf(tname, sizeof(tname), "process%d:thread%d", p, t);
      |                                                           ^~
bench/numa.c:1749:64: note: directive argument in the range [-2147483647, 2147483646]
 1749 |           snprintf(tname, sizeof(tname), "process%d:thread%d", p, t);
      |                                                   ^~~~~~~~~~~~~~~~~~~~
bench/numa.c:1749:33: note: ‘snprintf’ output between 17 and 37 bytes into a destination of size 35
 1749 |           snprintf(tname, sizeof(tname), "process%d:thread%d", p, t);
      |                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/root/linux/tools/build/Makefile.build:97: bench/numa.o] Error 1

Does this also show up on other plattforms?

Looks like commit 3aff8ba0a4c9 ("perf bench numa: Avoid possible truncation when using snprintf()")
has fixed this issue before and now it reappeared.

-- 
Thomas Richter, Dept 3303, IBM s390 Linux Development, Boeblingen, Germany
--
Vorsitzender des Aufsichtsrats: Gregor Pillen
Geschäftsführung: David Faller
Sitz der Gesellschaft: Böblingen / Registergericht: Amtsgericht Stuttgart, HRB 243294

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-17  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-16  7:24 File bench/numa.c compiler error on s390 Thomas Richter
2022-05-16 12:51 ` Arnaldo Carvalho de Melo
2022-05-17  8:59   ` Thomas Richter

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 NNTP newsgroup(s).