Re: [PATCH v1 1/3] lib subcmd: Fix memory leak in uniq

From: Ian Rogers
Date: Thu Jan 04 2024 - 18:30:02 EST


On Thu, Jan 4, 2024 at 1:03 PM Arnaldo Carvalho de Melo <acme@xxxxxxxxxx> wrote:
>
> Em Tue, Jan 02, 2024 at 11:30:39AM -0800, Ian Rogers escreveu:
> > On Thu, Dec 7, 2023 at 4:05 PM Ian Rogers <irogers@xxxxxxxxxx> wrote:
> > >
> > > uniq will write one command name over another causing the overwritten
> > > string to be leaked. Fix by doing a pass that removes duplicates and a
> > > second that removes the holes.
> > >
> > > Signed-off-by: Ian Rogers <irogers@xxxxxxxxxx>
> >
> > Ping for this series, no comments since sent.
>
> I applied the first one, the fix for uniq(), but somehow the second
> didn't work for me as in your examples, nor the third, the output is the
> same as before.

I tried to repro the failure with a rebase but couldn't. I suspected
libsubcmd wasn't being rebuilt or something like that. I suspect now
that you have ~/.perfconfig with help.autocorrect set, which means the
output will vary as it will automatically try to run the autocorrected
command. Could you check for me?

Thanks,
Ian