Re: [PATCH v1] perf stat: Fix aggr mode initialization

From: Arnaldo Carvalho de Melo
Date: Wed Sep 06 2023 - 10:30:38 EST


Em Tue, Sep 05, 2023 at 07:58:20PM -0700, Namhyung Kim escreveu:
> On Tue, Sep 5, 2023 at 5:39 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> > The issue was the use of testing a cpumap with NULL rather than using
> > empty, as a map containing the dummy value isn't NULL and the -1
> > results in an empty aggr map being allocated which legitimately
> > overflows when any member is accessed.
>
> Right, evlist__create_maps() set it to non-NULL.
>
> >
> > Fixes: 8a96f454f566 ("perf stat: Avoid SEGV if core.cpus isn't set")
> > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
>
> Acked-by: Namhyung Kim <namhyung@xxxxxxxxxx>

Thanks, applied.

- Arnaldo

> Thanks,
> Namhyung