Home
last modified time | relevance | path

Searched hist:"78 a175c4623f66722709494295a0f6754b46f858" (Results 1 – 1 of 1) sorted by relevance

/linux/tools/perf/util/
H A Dsymbol.cdiff 78a175c4623f66722709494295a0f6754b46f858 Fri Jun 30 17:38:39 CEST 2023 James Clark <james.clark@arm.com> perf symbol: Fix uninitialized return value in symbols__find_by_name()

found_idx and s aren't initialized, so if no symbol is found then the
assert at the end will index off the end of the array causing a
segfault. The function also doesn't return NULL when the symbol isn't
found even if the assert passes. Fix it by initializing the values and
only setting them when something is found.

Fixes the following test failure:

$ perf test 1
1: vmlinux symtab matches kallsyms : FAILED!

Fixes: 259dce914e93 ("perf symbol: Remove symbol_name_rb_node")
Signed-off-by: James Clark <james.clark@arm.com>
Acked-by: Ian Rogers <irogers@google.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Ingo Molnar <mingo@redhat.com>
Link: https://lore.kernel.org/r/20230630153840.858668-1-james.clark@arm.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>