From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753198AbbKWOcl (ORCPT ); Mon, 23 Nov 2015 09:32:41 -0500 Received: from mail.kernel.org ([198.145.29.136]:57195 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752230AbbKWOcj (ORCPT ); Mon, 23 Nov 2015 09:32:39 -0500 Date: Mon, 23 Nov 2015 11:32:30 -0300 From: Arnaldo Carvalho de Melo To: Jiri Olsa Cc: linux-kernel@vger.kernel.org, Masami Hiramatsu , Jiri Olsa , Wang Nan , Namhyung Kim Subject: Re: [PATCH] perf callchain: Add missing parent_val initialization Message-ID: <20151123143230.GD10315@kernel.org> References: <20151120150018.GP29361@kernel.org> <20151120155657.GA24188@krava.brq.redhat.com> <20151120165910.GA29036@krava.local> <20151121030953.GA22442@danjae.kornet> <20151121102355.GA17313@krava.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20151121102355.GA17313@krava.local> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Sat, Nov 21, 2015 at 11:23:55AM +0100, Jiri Olsa escreveu: > Adding missing parent_val callchain_node initialization. > It's causing segfault in perf top: Thanks, applied. - Arnaldo > $ sudo perf top -g > perf: Segmentation fault > -------- backtrace -------- > free_callchain_node(+0x29) in perf [0x4a4b3e] > free_callchain(+0x29) in perf [0x4a5a83] > hist_entry__delete(+0x126) in perf [0x4c6649] > hists__delete_entry(+0x6e) in perf [0x4c66dc] > hists__decay_entries(+0x7d) in perf [0x4c6776] > perf_top__sort_new_samples(+0x7c) in perf [0x436a78] > hist_browser__run(+0xf2) in perf [0x507760] > perf_evsel__hists_browse(+0x1da) in perf [0x507c8d] > perf_evlist__tui_browse_hists(+0x3e) in perf [0x5088cf] > display_thread_tui(+0x7f) in perf [0x437953] > start_thread(+0xc5) in libpthread-2.21.so [0x7f7068fbb555] > __clone(+0x6d) in libc-2.21.so [0x7f7066fc3b9d] > [0x0] > > Acked-by: Namhyung Kim > Link: http://lkml.kernel.org/n/tip-x001nhduevgcl78ublk9eaiz@git.kernel.org > Signed-off-by: Jiri Olsa > --- > tools/perf/util/callchain.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/util/callchain.h b/tools/perf/util/callchain.h > index 6e9b5f2099e1..8ac8f043004c 100644 > --- a/tools/perf/util/callchain.h > +++ b/tools/perf/util/callchain.h > @@ -143,6 +143,7 @@ extern __thread struct callchain_cursor callchain_cursor; > static inline void callchain_init(struct callchain_root *root) > { > INIT_LIST_HEAD(&root->node.val); > + INIT_LIST_HEAD(&root->node.parent_val); > > root->node.parent = NULL; > root->node.hit = 0; > -- > 2.4.3