linux/tools/perf
Ian Rogers 93fd7adf1a perf stat: Avoid uninitialized memory read on error
If has_supported_counters fails then msg was passed to ui__error
regardless of whether an error was written into msg leading to reading
uninitialized memory. Avoid this by always terminating msg at
initialization.

Opportunistically reduce the scope of msg to make its use clearer.

Fixes: c9a8c343ef ("perf stat: When no events, don't report an error if there is none")
Signed-off-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20260908220720.564614-1-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2026-09-09 08:10:17 -03:00
..
arch Merge remote-tracking branch 'torvalds/master' into perf-tools-next 2026-09-08 17:14:35 -03:00
bench perf bench futex: Define SYS_futex on 32-bit arches with 64-bit time_t 2026-09-08 17:50:39 -03:00
check-header_ignore_hunks/lib
dlfilters
Documentation perf tools: Add support for displaying weights in annotate 2026-09-04 18:20:29 -03:00
include/perf
jvmti
pmu-events perf vendor events arm64: Fix Tegra410 Olympus event 0x0197 2026-08-18 14:31:18 -07:00
python perf python: Fix MetricGroup return type in perf.pyi 2026-08-09 22:02:41 -07:00
scripts perf build: install-build-deps: add RHEL family devel package mapping 2026-08-12 06:17:49 -07:00
tests perf test: Avoid call to missing cleanup function 2026-09-08 18:13:52 -03:00
trace perf trace: Introduce kernel symbol beautifier for virtual addresses 2026-09-04 18:14:01 -03:00
ui perf hist: Remove keysym.h include from hist.h 2026-09-08 17:50:37 -03:00
util perf unwind: Handle allocation failure in libdw__get_entries() 2026-09-08 18:51:13 -03:00
.clang-format
.gitignore
bpf_skel.mak
Build
builtin-annotate.c perf hist: Remove keysym.h include from hist.h 2026-09-08 17:50:37 -03:00
builtin-bench.c
builtin-buildid-cache.c
builtin-buildid-list.c
builtin-c2c.c perf hist: Remove keysym.h include from hist.h 2026-09-08 17:50:37 -03:00
builtin-check.c
builtin-config.c perf tool: Tidy up util/cache.h header file users 2026-09-08 17:50:28 -03:00
builtin-daemon.c
builtin-data.c
builtin-diff.c
builtin-evlist.c
builtin-ftrace.c perf ftrace latency: Do not read trace files when BPF is used 2026-09-08 18:04:33 -03:00
builtin-help.c perf tool: Tidy up util/cache.h header file users 2026-09-08 17:50:28 -03:00
builtin-inject.c
builtin-kallsyms.c
builtin-kmem.c
builtin-kvm.c perf hist: Remove keysym.h include from hist.h 2026-09-08 17:50:37 -03:00
builtin-kwork.c
builtin-list.c
builtin-lock.c
builtin-mem.c
builtin-probe.c
builtin-record.c perf tools: Fix sb_evlist leaks in top and record 2026-08-09 21:58:10 -07:00
builtin-report.c perf hist: Remove keysym.h include from hist.h 2026-09-08 17:50:37 -03:00
builtin-sched.c perf sched latency: Add histogram and time interval options 2026-08-07 10:56:23 -07:00
builtin-script.c perf script: Fix metric_evlist leak in script_find_metrics 2026-08-09 21:58:10 -07:00
builtin-stat.c perf stat: Avoid uninitialized memory read on error 2026-09-09 08:10:17 -03:00
builtin-timechart.c
builtin-top.c perf hist: Remove keysym.h include from hist.h 2026-09-08 17:50:37 -03:00
builtin-trace.c perf trace: Add upper bound checks for augmented BTF struct printing 2026-09-08 18:42:37 -03:00
builtin-version.c
builtin.h perf tool: Move usage strings and functions to perf.c 2026-09-08 17:50:32 -03:00
check-headers.sh
CREDITS
design.txt
Makefile
Makefile.config perf build: Add clang and rust target flags for LoongArch 2026-09-04 21:45:27 +08:00
Makefile.perf perf build: install-build-deps: add Debian devel package mapping 2026-08-12 06:17:48 -07:00
MANIFEST
perf-archive.sh
perf-completion.sh
perf-iostat.sh
perf-read-vdso.c
perf-sys.h
perf.c perf tool: Add fallback stubs for missing dependencies 2026-09-08 17:50:34 -03:00
perf.h