All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Thomas Richter <tmricht@linux.ibm.com>
Cc: "linux-perf-use." <linux-perf-users@vger.kernel.org>
Subject: Re: File bench/numa.c compiler error on s390
Date: Mon, 16 May 2022 09:51:02 -0300	[thread overview]
Message-ID: <YoJItiE0xWDutZKR@kernel.org> (raw)
In-Reply-To: <00a443b1-92e0-8992-18ae-10e0e8489658@linux.ibm.com>

Em Mon, May 16, 2022 at 09:24:52AM +0200, Thomas Richter escreveu:
> 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:

Humm, I regularly build on fedora 36 and didn't catch this :-\

[perfbuilder@five ~]$ grep gcc dm.log/fedora\:36
perf-5.18.0-rc6/tools/include/asm-generic/atomic-gcc.h
perf-5.18.0-rc6/tools/include/linux/compiler-gcc.h
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/12/lto-wrapper
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,objc,obj-c++,ada,go,d,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl=/builddir/build/BUILD/gcc-12.0.1-20220413/obj-x86_64-redhat-linux/isl-install --enable-offload-targets=nvptx-none --without-cuda-driver --enable-offload-defaulted --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux --with-build-config=bootstrap-lto --enable-link-serialization=1
gcc version 12.0.1 20220413 (Red Hat 12.0.1-0) (GCC)
Found candidate GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/12
Selected GCC installation: /usr/bin/../lib/gcc/x86_64-redhat-linux/12
[perfbuilder@five ~]$

[perfbuilder@five ~]$ grep fedora:36 dm.log/summary
  51   125.79 fedora:36                     : Ok   gcc (GCC) 12.0.1 20220413 (Red Hat 12.0.1-0) , clang version 14.0.0 (Fedora 14.0.0-1.fc36)
[perfbuilder@five ~]$

[perfbuilder@five ~]$ grep TARBALL_HEAD dm.log/fedora\:36
BUILD_TARBALL_HEAD=c46721e4604f260918e660550a16d1e28637d66c
[perfbuilder@five ~]$

[acme@quaco perf-urgent]$ git log --oneline -5 
c46721e4604f2609 (HEAD -> perf/urgent, tag: perf-tools-fixes-for-v5.18-2022-05-14, five/perf/urgent, acme.korg/tmp.perf/urgent, acme.korg/perf/urgent) MAINTAINERS: Add James and Mike as Arm64 performance events reviewers
474e76c4075c1046 tools headers UAPI: Sync linux/kvm.h with the kernel sources
45fa7c38696bae63 perf tests: Fix coresight `perf test` failure.
183d4f2d23acecb2 perf bench: Fix two numa NDEBUG warnings
c5eb0a61238dd6fa (tag: v5.18-rc6) Linux 5.18-rc6
[acme@quaco perf-urgent]$

[acme@quaco perf-urgent]$ git log --oneline -10 tools/perf/bench/numa.c
183d4f2d23acecb2 perf bench: Fix two numa NDEBUG warnings
f58faed7fb3f784e (tag: perf-tools-fixes-for-v5.18-2022-04-14) perf bench: Fix numa bench to fix usage of affinity for machines with #CPUs > 1K
8cb7a188ac33b71e perf bench: Fix numa testcase to check if CPU used to bind task is online
4d39c89f0b94bf4a perf tools: Fix various typos in comments
394e4306b093d037 perf bench numa: Fix the condition checks for max number of NUMA nodes
f92993851f01fa5d perf bench: Use condition variables in numa.
a508d061ef04b163 perf bench numa: Remove dead code in parse_nodes_opt()
2db13a9b30f7e438 perf bench numa: Use numa_node_to_cpus() to bind tasks to nodes
509f68e327d0c87e perf bench numa: Fix cpumask memory leak in node_has_cpus()
85372c6974aad0e4 perf bench numa: Fix benchmark names
[acme@quaco perf-urgent]$

> 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

-- 

- Arnaldo

  reply	other threads:[~2022-05-16 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-16  7:24 File bench/numa.c compiler error on s390 Thomas Richter
2022-05-16 12:51 ` Arnaldo Carvalho de Melo [this message]
2022-05-17  8:59   ` Thomas Richter

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=YoJItiE0xWDutZKR@kernel.org \
    --to=acme@kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=tmricht@linux.ibm.com \
    /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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.