diff options
author | Wei Li <[email protected]> | 2020-06-12 17:43:22 +0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2020-07-06 09:03:39 -0300 |
commit | d61cbb859b45fdb6b4997f2d51834fae41af0e94 (patch) | |
tree | 1c6ede81cae151c48cf8f94173514081a1e13b6b /tools/perf/util/trace-event-scripting.c | |
parent | 2160d6c8a13e685b7b2bacbe9cd1e9600506a05f (diff) |
perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()
The segmentation fault can be reproduced as following steps:
1) Executing perf report in tui.
2) Typing '/xxxxx' to filter the symbol to get nothing matched.
3) Pressing enter with no entry selected.
Then it will report a segmentation fault.
It is caused by the lack of check of browser->he_selection when
accessing it's member res_samples in perf_evsel__hists_browse().
These processes are meaningful for specified samples, so we can skip
these when nothing is selected.
Fixes: 4968ac8fb7c3 ("perf report: Implement browsing of individual samples")
Signed-off-by: Wei Li <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Namhyung Kim <[email protected]>
Tested-by: Arnaldo Carvalho de Melo <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Andi Kleen <[email protected]>
Cc: Hanjun Guo <[email protected]>
Cc: Jin Yao <[email protected]>
Cc: Mark Rutland <[email protected]>
Link: http://lore.kernel.org/lkml/[email protected]
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions