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]
Date:	Tue, 11 Aug 2015 06:36:55 -0700
From:	Andi Kleen <ak@...ux.intel.com>
To:	Namhyung Kim <namhyung@...nel.org>
Cc:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Ingo Molnar <mingo@...nel.org>, linux-kernel@...r.kernel.org,
	Jiri Olsa <jolsa@...nel.org>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCH 7/9] perf report: Add support for srcfile sort key

> 
> AFAIK get_srcline() can return a string literal SRCLINE_UNKNOWN.  It
> should not be freed or altered..

Good point. Here's a patch.

---

perf, tools: Check for SRCLINE_UNKNOWN case in srcline
    
Handle the SRCLINE_UNKNOWN case correctly when processing srcfile.
    
Pointed out by Namhyung.

Signed-off-by: Andi Kleen <ak@...ux.intel.com>

diff --git a/tools/perf/util/sort.c b/tools/perf/util/sort.c
index c0c32b0..7e38716 100644
--- a/tools/perf/util/sort.c
+++ b/tools/perf/util/sort.c
@@ -330,6 +330,8 @@ static char *get_srcfile(struct hist_entry *e)
 
 	sf = get_srcline(map->dso, map__rip_2objdump(map, e->ip),
 			 e->ms.sym, true);
+	if (!strcmp(sf, SRCLINE_UNKNOWN))
+		return no_srcfile;
 	p = strchr(sf, ':');
 	if (p && *sf) {
 		*p = 0;
--
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