On Thu, 5 Mar 2026 at 10:18, Daniel P. Berrangé <[email protected]> wrote:
>
> On Wed, Mar 04, 2026 at 05:14:47PM -0600, Yodel Eldar wrote:
> > In that regard, Daniel's substitution method would fare better, but it
> > doesn't prevent build breakage before they occur, it may only apply to
> > stringop-overflow false positives (TBD), and it may come at the cost
> > of code clarity or expressiveness.
>
> This is not at all unique to the sanitizers option. Pretty much every
> single major GCC release introduces new logic that triggers compiler
> warnings in QEMU which break the build with -Werror, for both genuine
> bugs and new false positives.
>
> If you're using -Werror at all, you have to expect frequent breakage
> in the future. We fix the genuine bugs and workaround the false
> positives. We already have a number of examples of using
> "#pragma GCC diagnostic push" for this purpose across the codebase.
> I don't see a strong reason to treat this one sanitizers issue
> differently from other false positives we address.

Mmm. I guess I'm coming around to the idea that we should put in
the workaround you mentiened in the other thread, plus a comment
explaining why and linking to the gcc bugs.

There is a difference here in that here gcc is explicitly
documenting that they're going to produce false positives
(a.k.a "we know our implementation is buggy here"). But as you
say, if there really is just this one place in our code where
we have to work around this, it's probably easiest to just do that.

thanks
-- PMM

Reply via email to