From: Arnaldo Carvalho de Melo <arnaldo.melo@gmail.com>
To: Vince Weaver <vincent.weaver@maine.edu>
Cc: linux-kernel@vger.kernel.org,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>
Subject: Re: [patch] perf report segfault with 0-sized strings
Date: Fri, 26 Jul 2019 16:10:37 -0300 [thread overview]
Message-ID: <20190726191037.GE20482@kernel.org> (raw)
In-Reply-To: <alpine.DEB.2.21.1907251501290.22624@macbook-air>
Em Thu, Jul 25, 2019 at 03:04:32PM -0400, Vince Weaver escreveu:
>
> probably all perf_header_strings are affected by this. The fuzzer just
> tripped up cmdline now, which needs this fix.
I think we have to catch this earlier, i.e. when processing each
feature, lemme check...
- Arnaldo
> Signed-off-by: Vince Weaver <vincent.weaver@maine.edu>
>
> diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c
> index c24db7f4909c..631aa1911f3a 100644
> --- a/tools/perf/util/header.c
> +++ b/tools/perf/util/header.c
> @@ -1427,6 +1430,8 @@ static void print_cmdline(struct feat_fd *ff, FILE *fp)
>
> fprintf(fp, "# cmdline : ");
>
> + if (ff->ph->env.cmdline_argv==NULL) return;
> +
> for (i = 0; i < nr; i++) {
> char *argv_i = strdup(ff->ph->env.cmdline_argv[i]);
> if (!argv_i) {
--
- Arnaldo
next prev parent reply other threads:[~2019-07-26 19:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-25 18:27 [patch] perf report segfault with 0-sized strings Vince Weaver
2019-07-25 19:04 ` Vince Weaver
2019-07-26 19:10 ` Arnaldo Carvalho de Melo [this message]
2019-07-26 19:09 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190726191037.GE20482@kernel.org \
--to=arnaldo.melo@gmail.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=vincent.weaver@maine.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.