From: James Clark <james.clark@linaro.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Kan Liang <kan.liang@linux.intel.com>,
linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1] perf inject: Fix use without initialization of local variables
Date: Wed, 11 Dec 2024 09:58:00 +0000 [thread overview]
Message-ID: <6f441be9-7731-45dd-a131-39cc2e34dc1a@linaro.org> (raw)
In-Reply-To: <20241211060831.806539-1-irogers@google.com>
On 11/12/2024 6:08 am, Ian Rogers wrote:
> Local variables were missing initialization and command line
> processing didn't provide default values.
>
> Fixes: 64eed019f3fc ("perf inject: Lazy build-id mmap2 event insertion")
> Signed-off-by: Ian Rogers <irogers@google.com>
> ---
> tools/perf/builtin-inject.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c
> index d6989195a061..11e49cafa3af 100644
> --- a/tools/perf/builtin-inject.c
> +++ b/tools/perf/builtin-inject.c
> @@ -2367,10 +2367,10 @@ int cmd_inject(int argc, const char **argv)
> };
> int ret;
> const char *known_build_ids = NULL;
> - bool build_ids;
> - bool build_id_all;
> - bool mmap2_build_ids;
> - bool mmap2_build_id_all;
> + bool build_ids = false;
> + bool build_id_all = false;
> + bool mmap2_build_ids = false;
> + bool mmap2_build_id_all = false;
>
> struct option options[] = {
> OPT_BOOLEAN('b', "build-ids", &build_ids,
Reviewed-by: James Clark <james.clark@linaro.org>
next prev parent reply other threads:[~2024-12-11 9:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-11 6:08 [PATCH v1] perf inject: Fix use without initialization of local variables Ian Rogers
2024-12-11 9:58 ` James Clark [this message]
2025-01-13 15:48 ` 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=6f441be9-7731-45dd-a131-39cc2e34dc1a@linaro.org \
--to=james.clark@linaro.org \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.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