perf script: Make itrace script default to all calls
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