diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-08-10 14:45:55 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2015-08-10 16:01:00 -0400 |
commit | 5cef897652f224442c013d9e9425536b38385351 (patch) | |
tree | 088a1f7b543e78125c7f070a6f09aac005b65e8b /tools | |
parent | ab35a7d0ee59a36c9c567defe43c1adb72e9240c (diff) |
perf hists: hist_entry__cmp() may use he_tmp.hists, initialize it
The iter_add_next_cumulative_entry() function calls hist_entry__cmp(),
which may want to access the hists where this hist_entry is stored,
initialize it to let that happen and avoid segfaults.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-iqg98sfn4fvwcxp0pdvqauie@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/hist.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/perf/util/hist.c b/tools/perf/util/hist.c index a6e9ddd37913..2fe6ea39e257 100644 --- a/tools/perf/util/hist.c +++ b/tools/perf/util/hist.c | |||
@@ -761,6 +761,7 @@ iter_add_next_cumulative_entry(struct hist_entry_iter *iter, | |||
761 | struct hist_entry **he_cache = iter->priv; | 761 | struct hist_entry **he_cache = iter->priv; |
762 | struct hist_entry *he; | 762 | struct hist_entry *he; |
763 | struct hist_entry he_tmp = { | 763 | struct hist_entry he_tmp = { |
764 | .hists = evsel__hists(evsel), | ||
764 | .cpu = al->cpu, | 765 | .cpu = al->cpu, |
765 | .thread = al->thread, | 766 | .thread = al->thread, |
766 | .comm = thread__comm(al->thread), | 767 | .comm = thread__comm(al->thread), |