[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20180726193046.GC20438@kernel.org>
Date: Thu, 26 Jul 2018 16:30:46 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Jiri Olsa <jolsa@...nel.org>
Cc: lkml <linux-kernel@...r.kernel.org>,
Ingo Molnar <mingo@...nel.org>,
Namhyung Kim <namhyung@...nel.org>,
David Ahern <dsahern@...il.com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>, rodia@...istici.org
Subject: Re: [PATCH] perf c2c report: Fix crash for empty browser
Em Tue, Jul 24, 2018 at 08:20:08AM +0200, Jiri Olsa escreveu:
> Do not try to display entry details if there's
> not any. Currently this ends up in crash:
> $ perf c2c report
> perf: Segmentation fault
How to replicate this?
I tried:
$ perf record sleep 1
$ perf c2c report
But it didn't segfault
> Reported-by: rodia@...istici.org
> Link: http://lkml.kernel.org/n/tip-3d7qjz9x49ay9ncerfordcv3@git.kernel.org
> Signed-off-by: Jiri Olsa <jolsa@...nel.org>
> ---
> tools/perf/builtin-c2c.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/tools/perf/builtin-c2c.c b/tools/perf/builtin-c2c.c
> index f2ea85ee573f..f3aa9d02a5ab 100644
> --- a/tools/perf/builtin-c2c.c
> +++ b/tools/perf/builtin-c2c.c
> @@ -2349,6 +2349,9 @@ static int perf_c2c__browse_cacheline(struct hist_entry *he)
> " s Toggle full length of symbol and source line columns \n"
> " q Return back to cacheline list \n";
>
> + if (!he)
> + return 0;
> +
> /* Display compact version first. */
> c2c.symbol_full = false;
>
> --
> 2.17.1
Powered by blists - more mailing lists