All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Yodel Eldar <yodel.eldar@yodel.dev>
Cc: "Thomas Huth" <thuth@redhat.com>,
	qemu-devel@nongnu.org, "Paolo Bonzini" <pbonzini@redhat.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	"Peter Maydell" <peter.maydell@linaro.org>
Subject: Re: [RFC PATCH v2] configure: Use clang for sanitizer builds or disable Werror
Date: Thu, 5 Mar 2026 10:18:26 +0000	[thread overview]
Message-ID: <aalYcixE-EwlRZhA@redhat.com> (raw)
In-Reply-To: <3a7617d2-ff9d-403c-9733-14f7c1b5ac3d@yodel.dev>

On Wed, Mar 04, 2026 at 05:14:47PM -0600, Yodel Eldar wrote:
> On 04/03/2026 01:38, Thomas Huth wrote:
> > On 04/03/2026 02.08, Yodel Eldar wrote:
> > > +Daniel (thanks for your comments)
> > > 
> > > On 02/03/2026 19:20, Yodel Eldar wrote:
> > > > From: Yodel Eldar <yodel.eldar@yodel.dev>
> > > > 
> > > > Builds with --enable-{asan,tsan,safe-stack} fail under GCC, so use
> > > > clang if available, otherwise disable the treatment of warnings as
> > > > errors.
> > > > 
> > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/3006
> > > > Suggested-by: Peter Maydell <peter.maydell@linaro.org>
> > > > Signed-off-by: Yodel Eldar <yodel.eldar@yodel.dev>
> > > > ---
> > > > Hi,
> > > > 
> > > > The previous version only disabled Werror whenever `--skip-meson` wasn't
> > > > used and the build occurred in a git repo, but this change should
> > > > probably apply to all types of builds. So, let's use meson_option_add
> > > > to globally disable Werror instead; IIUC (and according to my testing),
> > > > this will override the value in config-meson.cross.new.
> > > > 
> > > > I'm still not sure if we should be disabling Werror for ubsan, even
> > > > though it's not currently breaking builds with GCC; please let me know
> > > > what you think.
> > > > 
> > > > Special thanks to Peter for looking into the cause of the reports around
> > > > this, for sharing the findings, and suggesting approaches to resolve it.
> > > > I couldn't pick one over the other, so I went with using clang when
> > > > available with Werror disable as a fallback; please let me know if you
> > > > think this is an XOR kind of policy decision.
> > > > 
> > > > Link to RFCv1:
> > > > https://lore.kernel.org/qemu-devel/20260302210039.261325-1-
> > > > yodel.eldar@yodel.dev/
> > > > 
> > > > Link to mentioned discussion:
> > > > https://lore.kernel.org/qemu-devel/
> > > > CAFEAcA88hc4UsgpuPXBWpbeN0tW26159kPn7jx2J9erBA5DLBw@mail.gmail.com/

snip

> 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.

With regards,
Daniel
-- 
|: https://berrange.com       ~~        https://hachyderm.io/@berrange :|
|: https://libvirt.org          ~~          https://entangle-photo.org :|
|: https://pixelfed.art/berrange   ~~    https://fstop138.berrange.com :|



  reply	other threads:[~2026-03-05 10:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03  1:20 [RFC PATCH v2] configure: Use clang for sanitizer builds or disable Werror Yodel Eldar
2026-03-03  8:41 ` Daniel P. Berrangé
2026-03-03  9:36   ` Peter Maydell
2026-03-03 10:01     ` Daniel P. Berrangé
2026-03-03 10:05       ` Peter Maydell
2026-03-03  8:49 ` Thomas Huth
2026-03-04  1:08 ` Yodel Eldar
2026-03-04  7:38   ` Thomas Huth
2026-03-04 23:14     ` Yodel Eldar
2026-03-05 10:18       ` Daniel P. Berrangé [this message]
2026-03-05 10:47         ` Peter Maydell
2026-03-04 10:09   ` Daniel P. Berrangé

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aalYcixE-EwlRZhA@redhat.com \
    --to=berrange@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=thuth@redhat.com \
    --cc=yodel.eldar@yodel.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.