2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00
linux/tools/perf/ui
Arnaldo Carvalho de Melo 2333cfa9f8 perf hist stdio: Do bounds check when printing callchains to avoid UB with new gcc versions
Do a simple bounds check to avoid this on new gcc versions:

  31    15.81 fedora:rawhide                : FAIL gcc version 15.0.1 20250225 (Red Hat 15.0.1-0) (GCC)
    In function 'callchain__fprintf_left_margin',
        inlined from 'callchain__fprintf_graph.constprop' at ui/stdio/hist.c:246:12:
    ui/stdio/hist.c:27:39: error: iteration 2147483647 invokes undefined behavior [-Werror=aggressive-loop-optimizations]
       27 |         for (i = 0; i < left_margin; i++)
          |                                      ~^~
    ui/stdio/hist.c:27:23: note: within this loop
       27 |         for (i = 0; i < left_margin; i++)
          |                     ~~^~~~~~~~~~~~~
    cc1: all warnings being treated as errors

Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Link: https://lore.kernel.org/r/20250310194534.265487-4-acme@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-03-13 00:30:14 -07:00
..
browsers perf report: Add latency output field 2025-02-18 14:04:32 -08:00
gtk perf annotate: Prefer passing evsel to evsel->core.idx 2025-01-18 10:02:10 -08:00
stdio perf hist stdio: Do bounds check when printing callchains to avoid UB with new gcc versions 2025-03-13 00:30:14 -07:00
tui perf ui: Make ui its own library 2024-06-26 11:06:34 -07:00
browser.c perf ui browser: Avoid SEGV on title 2024-05-09 18:12:47 -03:00
browser.h perf ui browser: Don't save pointer to stack memory 2024-05-07 18:05:31 -03:00
Build perf ui: Make ui its own library 2024-06-26 11:06:34 -07:00
helpline.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
helpline.h perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
hist.c perf report: Add --latency flag 2025-02-18 14:04:32 -08:00
keysyms.h perf report: Support a new key to reload the browser 2020-03-24 09:37:27 -03:00
libslang.h perf tui slang: Tidy casts 2023-08-25 10:24:55 -03:00
progress.c perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
progress.h Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
setup.c perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
ui.h perf ui: Move window resize signal functions 2023-04-10 19:20:38 -03:00
util.c perf tools: Fix "kernel lock contention analysis" test by not printing warnings in quiet mode 2022-10-27 16:37:26 -03:00
util.h tools ui popup: Allow returning hotkeys 2020-01-06 11:46:10 -03:00