linux/tools/perf/tests
Changbin Du f97a8991d3 perf tests: Fix memory leak by expr__find_other() in test__expr()
=================================================================
  ==7506==ERROR: LeakSanitizer: detected memory leaks

  Direct leak of 13 byte(s) in 3 object(s) allocated from:
      #0 0x7f03339d6070 in __interceptor_strdup (/usr/lib/x86_64-linux-gnu/libasan.so.5+0x3b070)
      #1 0x5625e53aaef0 in expr__find_other util/expr.y:221
      #2 0x5625e51bcd3f in test__expr tests/expr.c:52
      #3 0x5625e51528e6 in run_test tests/builtin-test.c:358
      #4 0x5625e5152baf in test_and_print tests/builtin-test.c:388
      #5 0x5625e51543fe in __cmd_test tests/builtin-test.c:583
      #6 0x5625e515572f in cmd_test tests/builtin-test.c:722
      #7 0x5625e51c3fb8 in run_builtin /home/changbin/work/linux/tools/perf/perf.c:302
      #8 0x5625e51c44f7 in handle_internal_command /home/changbin/work/linux/tools/perf/perf.c:354
      #9 0x5625e51c48fb in run_argv /home/changbin/work/linux/tools/perf/perf.c:398
      #10 0x5625e51c5069 in main /home/changbin/work/linux/tools/perf/perf.c:520
      #11 0x7f033214d09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)

Signed-off-by: Changbin Du <changbin.du@gmail.com>
Cc: Alexei Starovoitov <ast@kernel.org>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Daniel Borkmann <daniel@iogearbox.net>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Steven Rostedt (VMware) <rostedt@goodmis.org>
Fixes: 075167363f ("perf tools: Add a simple expression parser for JSON")
Link: http://lkml.kernel.org/r/20190316080556.3075-16-changbin.du@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2019-03-19 16:52:05 -03:00
..
attr perf tools: Fix crash on synthesizing the unit 2018-11-12 08:37:49 -08:00
shell perf tests shell: Skip trace+probe_vfs_getname.sh if built without trace support 2019-02-15 13:42:26 -03:00
.gitignore perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
attr.c perf tools: Fix diverse comment typos 2018-12-17 14:56:47 -03:00
attr.py perf script python: Add Python3 support to tests/attr.py 2019-02-05 10:31:08 -03:00
backward-ring-buffer.c perf tools: Fix errors under optimization level '-Og' 2019-03-19 16:52:04 -03:00
bitmap.c perf tools: Drop unneeded bitmap_zero() calls 2018-08-08 15:55:44 -03:00
bp_account.c perf tools: Remove duplicate headers 2019-01-21 15:15:57 -03:00
bp_signal.c perf tests ARM: Disable breakpoint tests 32-bit 2018-12-17 14:56:27 -03:00
bp_signal_overflow.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
bpf-script-example.c perf test BPF: Fixup BPF test using epoll_pwait syscall function probe 2018-04-18 15:35:53 -03:00
bpf-script-test-kbuild.c perf tests bpf: Remove unused ptrace.h include from LLVM test 2018-04-12 10:33:24 -03:00
bpf-script-test-prologue.c perf bpf: Fix endianness problem when loading parameters in prologue 2017-08-16 10:31:11 -03:00
bpf-script-test-relocation.c perf test: Add libbpf relocation checker 2016-01-26 12:10:55 -03:00
bpf.c perf mmap: Simplify perf_mmap__read_init() 2018-03-08 10:05:53 -03:00
Build perf test: Add watchpoint test 2018-09-18 17:21:13 -03:00
builtin-test.c perf tests: Use shebangs in the shell scripts 2018-12-18 12:21:44 -03:00
clang.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
code-reading.c perf tools: Add missing include for symbols.h 2019-02-06 10:00:38 -03:00
cpumap.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dso-data.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
dwarf-unwind.c perf tools: Add missing include for symbols.h 2019-02-06 10:00:38 -03:00
event-times.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
event_update.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
evsel-roundtrip-name.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
evsel-tp-sched.c perf test: Fix failure of 'evsel-tp-sched' test on s390 2019-02-19 13:43:29 -03:00
expr.c perf tests: Fix memory leak by expr__find_other() in test__expr() 2019-03-19 16:52:05 -03:00
fdarray.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hists_common.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
hists_common.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
hists_cumulate.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
hists_filter.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
hists_link.c perf hist: Use cached rbtrees 2019-01-25 15:12:10 +01:00
hists_output.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
is_printable_array.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
keep-tracking.c perf mmap: Simplify perf_mmap__read_init() 2018-03-08 10:05:53 -03:00
kmod-path.c perf tools: Remove ext from struct kmod_path 2018-08-20 08:54:59 -03:00
llvm.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
llvm.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
make Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild 2016-12-17 16:24:13 -08:00
mem.c perf tools: Fix snprint warnings for gcc 8 2018-03-19 10:00:43 -03:00
mem2node.c perf tools: Drop unneeded bitmap_zero() calls 2018-08-08 15:55:44 -03:00
mmap-basic.c perf tests mmap: Show which tracepoint is failing 2018-04-18 15:35:52 -03:00
mmap-thread-lookup.c pref tools: Add missing map.h includes 2019-02-06 10:00:38 -03:00
openat-syscall-all-cpus.c perf tests: Fix a memory leak of cpu_map object in the openat_syscall_event_on_all_cpus test 2019-03-19 16:52:05 -03:00
openat-syscall-tp-fields.c perf mmap: Simplify perf_mmap__read_init() 2018-03-08 10:05:53 -03:00
openat-syscall.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
parse-events.c perf tools: Fix legacy events symbol separator parsing 2019-02-14 15:18:08 -03:00
parse-no-sample-id-all.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-hooks.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
perf-record.c perf tests record: Allow for 'sleep' being 'coreutils' 2018-12-17 14:54:26 -03:00
perf-targz-src-pkg License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pmu.c perf tests pmu: Add missing headers 2019-02-06 10:00:38 -03:00
python-use.c perf test: Use header file util/debug.h 2018-06-04 10:28:53 -03:00
sample-parsing.c perf tests: Add missing headers so far obtained indirectly 2019-02-06 10:00:38 -03:00
sdt.c perf tests: Add missing headers so far obtained indirectly 2019-02-06 10:00:38 -03:00
stat.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
sw-clock.c perf mmap: Simplify perf_mmap__read_init() 2018-03-08 10:05:53 -03:00
switch-tracking.c perf mmap: Simplify perf_mmap__read_init() 2018-03-08 10:05:53 -03:00
task-exit.c perf mmap: Simplify perf_mmap__read_init() 2018-03-08 10:05:53 -03:00
tests.h perf tests: Add a test for the ARM 32-bit [vectors] page 2019-01-08 13:28:13 -03:00
thread-map.c perf thread_map: Enumerate all threads from /proc 2017-12-27 12:15:46 -03:00
thread-mg-share.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
topology.c perf test session topology: Fix test on s390 2018-06-25 11:59:35 -03:00
unit_number__scnprintf.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmlinux-kallsyms.c perf machine: Ditch find_kernel_function variants 2018-04-30 12:20:54 -03:00
wp.c perf test: S390 does not support watchpoints in test 22 2018-10-08 14:23:44 -03:00