[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 00/22] -Werror=maybe-uninitialized fixes
From: |
Daniel P . Berrangé |
Subject: |
Re: [PATCH v2 00/22] -Werror=maybe-uninitialized fixes |
Date: |
Tue, 24 Sep 2024 15:08:35 +0200 |
User-agent: |
Mutt/2.2.12 (2023-09-09) |
On Tue, Sep 24, 2024 at 05:05:31PM +0400, marcandre.lureau@redhat.com wrote:
> From: Marc-André Lureau <marcandre.lureau@redhat.com>
>
> Hi,
>
> Depending on -Doptimization=<value>, GCC (14.2.1 here) produces different
> maybe-uninitialized warnings:
> - g: produces -Werror=maybe-uninitialized errors
> - 0: clean build
> - 1: produces -Werror=maybe-uninitialized errors
> - 2: clean build
> - 3: produces few -Werror=maybe-uninitialized errors
> - s: produces -Werror=maybe-uninitialized errors
>
> Most are false-positive, because prior LOCK_GUARD should guarantee an
> initialization path. Few of them are a bit trickier. Finally, I found
> a potential related memory leak.
In addition we now build with "-ftrivial-auto-var-init=zero", so
any case which is missing an "= NULL" or "= 0" initialization is
protected.
With regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
- Re: [PATCH v2 18/22] hw/virtio: fix -Werror=maybe-uninitialized false-positive, (continued)
[PATCH v2 19/22] block: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 14/22] migration: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 21/22] fsdep/9p: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 17/22] tests: fix -Werror=maybe-uninitialized false-positive, marcandre . lureau, 2024/09/24
[PATCH v2 22/22] RFC: hw/virtio: a potential leak fix, marcandre . lureau, 2024/09/24
[PATCH v2 20/22] qom/object: fix -Werror=maybe-uninitialized, marcandre . lureau, 2024/09/24
Re: [PATCH v2 00/22] -Werror=maybe-uninitialized fixes,
Daniel P . Berrangé <=