[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z1mQcsDCw0d8djjx@x1>
Date: Wed, 11 Dec 2024 10:15:30 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: James Clark <james.clark@...aro.org>
Cc: linux-perf-users@...r.kernel.org, namhyung@...nel.org,
mhiramat@...nel.org, Arnaldo Carvalho de Melo <acme@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>, Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
"Liang, Kan" <kan.liang@...ux.intel.com>, Leo Yan <leo.yan@....com>,
Dima Kogan <dima@...retsauce.net>,
"Dr. David Alan Gilbert" <linux@...blig.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] perf probe: Fix uninitialized variable
On Wed, Dec 11, 2024 at 08:55:23AM +0000, James Clark wrote:
> Since the linked fixes: commit, err is returned uninitialized due to the
> removal of "return 0". Initialize err to fix it.
>
> This fixes the following intermittent test failure on release builds:
>
> $ perf test "testsuite_probe"
> ...
> -- [ FAIL ] -- perf_probe :: test_invalid_options :: mutually exclusive options :: -L foo -V bar (output regexp parsing)
> Regexp not found: \"Error: switch .+ cannot be used with switch .+\"
> ...
So Namhyung, this one should go to perf-tools, I can pick the second on
perf-tools-next, so that we keep perf-tools as small as possible.
- Arnaldo
> Fixes: 080e47b2a237 ("perf probe: Introduce quotation marks support")
> Tested-by: Namhyung Kim <namhyung@...nel.org>
> Reviewed-by: Arnaldo Carvalho de Melo <acme@...hat.com>
> Acked-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
> Signed-off-by: James Clark <james.clark@...aro.org>
> ---
> tools/perf/util/probe-event.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/probe-event.c b/tools/perf/util/probe-event.c
> index 6d51a4c98ad7..eaa0318e9b87 100644
> --- a/tools/perf/util/probe-event.c
> +++ b/tools/perf/util/probe-event.c
> @@ -1370,7 +1370,7 @@ int parse_line_range_desc(const char *arg, struct line_range *lr)
> {
> char *buf = strdup(arg);
> char *p;
> - int err;
> + int err = 0;
>
> if (!buf)
> return -ENOMEM;
> --
> 2.34.1
Powered by blists - more mailing lists