Re: [PATCH perf/core] perf intel-pt: Fix clang build failure in intel_pt_synth_pebs_sample

From: Gustavo A. R. Silva
Date: Fri May 15 2020 - 13:04:40 EST


On Fri, May 15, 2020 at 01:43:31PM -0300, Arnaldo Carvalho de Melo wrote:
> Em Fri, May 15, 2020 at 01:41:53PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, May 14, 2020 at 07:10:25PM -0500, Gustavo A. R. Silva escreveu:
> > > On Thu, May 14, 2020 at 03:46:05PM -0700, Ian Rogers wrote:
> > > > On Thu, May 14, 2020 at 3:04 PM Gustavo A. R. Silva
> > > > <gustavoars@xxxxxxxxxx> wrote:
> > >
> > > Yep. I just built linux-next --which contains all the flexible-array
> > > conversions-- with Clang --GCC doesn't catch this issue, not even GCC
> > > 10-- and I don't see any other issue like this.
> > >
> > > I mean, I have run into these other two:
> > >
> > > https://lore.kernel.org/lkml/20200505235205.GA18539@embeddedor/
> > > 20200508163826.GA768@embeddedor/">https://lore.kernel.org/lkml/20200508163826.GA768@embeddedor/
> > >
> > > but those are due to the erroneous application of the sizeof operator
> > > to zero-length arrays.
> > >
> > > > complicated stack allocation I suggested. It may be nice to save
> > > > cycles if code this pattern is widespread and the code hot.
> > > >
> > >
> > > Apparently, this is the only instace of this sort of issue in the whole
> > > codebase.
> >
> > Adrian Hunter was not CCed, Adrian?
>
> Gustavo, I've removed this from my tree from now till this gets
> resolved.
>

Yep, sure. In the meantime, I'll send a patch without the changes
to struct branch_stack.

Thanks
--
Gustavo