lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140305153149.GQ12219@tassilo.jf.intel.com>
Date:	Wed, 5 Mar 2014 07:31:49 -0800
From:	Andi Kleen <ak@...ux.intel.com>
To:	Jiri Olsa <jolsa@...hat.com>
Cc:	Andi Kleen <andi@...stfloor.org>, acme@...hat.com,
	mingo@...nel.org, linux-kernel@...r.kernel.org, eranian@...gle.com,
	namhyung@...nel.org
Subject: Re: [PATCH 2/8] perf, tools: Support handling complete branch stacks
 as histograms v4

> segfaults here..
> 
> [jolsa@...va perf]$ ./perf record -g sleep 1
> [ perf record: Woken up 1 times to write data ]
> [ perf record: Captured and wrote 0.013 MB perf.data (~567 samples) ]
> [jolsa@...va perf]$ ./perf report
> perf: Segmentation fault
> [jolsa@...va perf]$ 

Thanks. Fixed with this patch:

commit 124014960a8fb09043914fb79ea86e0444408ab0
Author: Andi Kleen <ak@...ux.intel.com>
Date:   Wed Mar 5 07:28:56 2014 -0800

    perf, tools, report: Fix perf report without -b
    
    Fix report crash when -b is not used. Reported by Jiri Olsa.
    
    Signed-off-by: Andi Kleen <ak@...ux.intel.com>

diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c
index ef198c3..04ec451 100644
--- a/tools/perf/util/machine.c
+++ b/tools/perf/util/machine.c
@@ -1381,15 +1381,15 @@ static int machine__resolve_callchain_sample(struct machine *machine,
 	 * - No annotations (should annotate somehow)
 	 */
 
-	if (branch->nr > PERF_MAX_BRANCH_DEPTH) {
-		pr_warning("corrupted branch chain. skipping...\n");
-		return 0;
-	}
-
-	if (callchain_param.branch_callstack) {
+	if (branch && callchain_param.branch_callstack) {
 		int nr = min(max_stack, (int)branch->nr);
 		struct branch_entry be[nr];
 
+		if (branch->nr > PERF_MAX_BRANCH_DEPTH) {
+			pr_warning("corrupted branch chain. skipping...\n");
+			return 0;
+		}
+
 		for (i = 0; i < nr; i++) {
 			if (callchain_param.order == ORDER_CALLEE) {
 				be[i] = branch->entries[i];


-- 
ak@...ux.intel.com -- Speaking for myself only
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ