public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: [bug report] perf script: Make itrace script default to all calls
Date: Thu, 04 Apr 2019 11:06:10 +0000	[thread overview]
Message-ID: <20190404110610.GA31435@kadam> (raw)

Hello Andi Kleen,

This is a semi-automatic email about new static checker warnings.

The patch 4eb068157121: "perf script: Make itrace script default to 
all calls" from Sep 20, 2018, leads to the following Smatch complaint:

    ./tools/perf/util/intel-pt.c:2595 intel_pt_process_auxtrace_info()
    warn: variable dereferenced before check 'session->itrace_synth_opts' (see line 2590)

./tools/perf/util/intel-pt.c
  2589			itrace_synth_opts__set_default(&pt->synth_opts,
  2590					session->itrace_synth_opts->default_no_sample);
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
The patch added a new dereference

  2591			if (use_browser != -1) {
  2592				pt->synth_opts.branches = false;
  2593				pt->synth_opts.callchain = true;
  2594			}
  2595			if (session->itrace_synth_opts)
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^
but the existing code checked for NULL.

  2596				pt->synth_opts.thread_stack   2597					session->itrace_synth_opts->thread_stack;

regards,
dan carpenter

             reply	other threads:[~2019-04-04 11:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-04 11:06 Dan Carpenter [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-11-28 14:37 [bug report] perf script: Make itrace script default to all calls Dan Carpenter

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=20190404110610.GA31435@kadam \
    --to=dan.carpenter@oracle.com \
    --cc=kernel-janitors@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox