Il ven 28 apr 2023, 18:25 Juan Quintela <quint...@redhat.com> ha scritto:

> > On the other hand, if the pointer to the heap-allocated BHListSlice
> > escaped, this would be a dangling pointer as well—just not the kind that
> > the new GCC warning can report.
>
> I don't agree here.
> If with my patch it becomes a dangling pointer because we free it.
> With Cedric patch it is a local variable that gets exited out of the
> function that created it.


> Choose your poison.  One thing is bad and the other is worse.
>

Not sure which is worse—explicitly disabling a warning, at least, clearly
says the compiler finds it iffy.

> So this patch is also doing nothing but shut up the compiler; but it's
> > doing so in an underhanded manner and with a runtime cost, and as such
> it's
> > worse than Cedric's patch.
>
> Ok.  I don't care (enogouh) about this to continue a discussion.. Can we
> get Cedric patch upstream?
>

Yes I am sending the pull request very soon.

Paolo


> Thanks, Juan.
>
>

Reply via email to