1
0
Fork 0
alistair23-linux/tools/perf/ui
Wei Li 9ca67a4532 perf report TUI: Fix segmentation fault in perf_evsel__hists_browse()
[ Upstream commit d61cbb859b ]

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: 4968ac8fb7 ("perf report: Implement browsing of individual samples")
Signed-off-by: Wei Li <liwei391@huawei.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Hanjun Guo <guohanjun@huawei.com>
Cc: Jin Yao <yao.jin@linux.intel.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Link: http://lore.kernel.org/lkml/20200612094322.39565-1-liwei391@huawei.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-16 08:16:38 +02:00
..
browsers perf report TUI: Fix segmentation fault in perf_evsel__hists_browse() 2020-07-16 08:16:38 +02:00
gtk perf ui gtk: Add missing zalloc object 2020-03-05 16:43:50 +01:00
stdio perf tools: Move event synthesizing routines to separate header 2019-09-20 09:19:22 -03:00
tui perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
Build perf tools: Rename build libperf to perf 2019-02-14 15:18:08 -03:00
browser.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
browser.h perf ui browser: Allow specifying message to show when no samples are available to display 2019-08-20 12:22:18 -03:00
helpline.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
helpline.h perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
hist.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
keysyms.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
libslang.h perf build: Handle slang being in /usr/include and in /usr/include/slang/ 2019-06-18 17:48:12 -03:00
progress.c perf tools: Remove needless evlist.h include directives 2019-08-31 22:24:10 -03:00
progress.h Merge branch 'linus' into perf/core, to fix conflicts 2017-11-07 10:30:18 +01:00
setup.c perf tools: Remove util.h from where it is not needed 2019-09-20 09:19:20 -03:00
ui.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
util.c perf debug: Remove needless include directives from debug.h 2019-08-31 19:10:19 -03:00
util.h perf ui: Introduce non-interactive ui__info_window() function 2019-08-20 12:21:49 -03:00