lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 24 Dec 2014 15:04:36 +0900
From:	Namhyung Kim <>
To:	Arnaldo Carvalho de Melo <>
Cc:	Ingo Molnar <>,
	Peter Zijlstra <>,
	Jiri Olsa <>,
	LKML <>,
	Adrian Hunter <>,
	Stephane Eranian <>,
	Andi Kleen <>,
	Frederic Weisbecker <>
Subject: [PATCH] perf hists browser: Fix segfault when showing callchain

When perf report on TUI shows callchain it checks first node has
siblings to determine whether it needs to print percentage value.  But
it missed a case that first node is NULL.  So sometimes it segfaults
like below:

  $ perf top -g
  perf: Segmentation fault
  -------- backtrace --------

  $ addr2line -e `which perf` 0x4f6058

I don't know why the backtrace didn't print some symbols..

Fixes: 4087d11cd945 ("perf hists browser: Print overhead percent value for first-level callchain")
Signed-off-by: Namhyung Kim <>
 tools/perf/ui/browsers/hists.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/ui/browsers/hists.c b/tools/perf/ui/browsers/hists.c
index e6bb04b5b09b..788506eef567 100644
--- a/tools/perf/ui/browsers/hists.c
+++ b/tools/perf/ui/browsers/hists.c
@@ -550,7 +550,7 @@ static int hist_browser__show_callchain(struct hist_browser *browser,
 	bool need_percent;
 	node = rb_first(root);
-	need_percent = !!rb_next(node);
+	need_percent = node && rb_next(node);
 	while (node) {
 		struct callchain_node *child = rb_entry(node, struct callchain_node, rb_node);

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

Powered by blists - more mailing lists