[PATCH v2 0/7] Various asan and test fixes

Ian Rogers posted 7 patches 3 months, 1 week ago
tools/perf/tests/demangle-java-test.c   |   5 +
tools/perf/tests/shell/test_intel_pt.sh |   5 +
tools/perf/tests/shell/trace_summary.sh |   6 +
tools/perf/util/demangle-cxx.h          |   2 +
tools/perf/util/intel-tpebs.c           |  12 +-
tools/perf/util/symbol-elf.c            |  86 ------------
tools/perf/util/symbol-minimal.c        | 175 ++++++++++--------------
tools/perf/util/symbol.c                |  87 ++++++++++++
tools/perf/util/thread.c                |  17 ++-
9 files changed, 198 insertions(+), 197 deletions(-)
[PATCH v2 0/7] Various asan and test fixes
Posted by Ian Rogers 3 months, 1 week ago
When testing removing perf_env with asan I noticed a number of test
failures either because of asan issues or because of building with
NO_LIBELF=1 and NO_LIBBPF=1 to avoid false memory leaks. Address these
issues so that real test failures stand out.

v2: Fix wrong elf size use in filename__read_build_id fix. Add
    thread__comm_lock fix.

Ian Rogers (7):
  perf symbol: Fix use-after-free in filename__read_build_id
  perf test demangle-java: Don't segv if demangling fails
  perf symbol: Move demangling code out of symbol-elf.c
  perf intel-tpebs: Avoid race when evlist is being deleted
  perf test intel-pt: Skip jitdump test if no libelf
  perf test trace_summary: Skip --bpf-summary tests if no libbpf
  perf thread: Avoid recursively taking thread__comm_lock

 tools/perf/tests/demangle-java-test.c   |   5 +
 tools/perf/tests/shell/test_intel_pt.sh |   5 +
 tools/perf/tests/shell/trace_summary.sh |   6 +
 tools/perf/util/demangle-cxx.h          |   2 +
 tools/perf/util/intel-tpebs.c           |  12 +-
 tools/perf/util/symbol-elf.c            |  86 ------------
 tools/perf/util/symbol-minimal.c        | 175 ++++++++++--------------
 tools/perf/util/symbol.c                |  87 ++++++++++++
 tools/perf/util/thread.c                |  17 ++-
 9 files changed, 198 insertions(+), 197 deletions(-)

-- 
2.49.0.1238.gf8c92423fb-goog
Re: [PATCH v2 0/7] Various asan and test fixes
Posted by Namhyung Kim 3 months, 1 week ago
On Tue, May 27, 2025 at 08:26:30PM -0700, Ian Rogers wrote:
> When testing removing perf_env with asan I noticed a number of test
> failures either because of asan issues or because of building with
> NO_LIBELF=1 and NO_LIBBPF=1 to avoid false memory leaks. Address these
> issues so that real test failures stand out.
> 
> v2: Fix wrong elf size use in filename__read_build_id fix. Add
>     thread__comm_lock fix.
> 
> Ian Rogers (7):
>   perf symbol: Fix use-after-free in filename__read_build_id
>   perf test demangle-java: Don't segv if demangling fails
>   perf symbol: Move demangling code out of symbol-elf.c
>   perf intel-tpebs: Avoid race when evlist is being deleted
>   perf test intel-pt: Skip jitdump test if no libelf
>   perf test trace_summary: Skip --bpf-summary tests if no libbpf
>   perf thread: Avoid recursively taking thread__comm_lock

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung

> 
>  tools/perf/tests/demangle-java-test.c   |   5 +
>  tools/perf/tests/shell/test_intel_pt.sh |   5 +
>  tools/perf/tests/shell/trace_summary.sh |   6 +
>  tools/perf/util/demangle-cxx.h          |   2 +
>  tools/perf/util/intel-tpebs.c           |  12 +-
>  tools/perf/util/symbol-elf.c            |  86 ------------
>  tools/perf/util/symbol-minimal.c        | 175 ++++++++++--------------
>  tools/perf/util/symbol.c                |  87 ++++++++++++
>  tools/perf/util/thread.c                |  17 ++-
>  9 files changed, 198 insertions(+), 197 deletions(-)
> 
> -- 
> 2.49.0.1238.gf8c92423fb-goog
>