From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: qemu-devel@nongnu.org, Michael Roth <michael.roth@amd.com>,
Kostiantyn Kostiuk <kkostiuk@redhat.com>,
qemu-trivial@nongnu.org
Subject: Re: [PATCH v2] qga: Fix ubsan warning
Date: Wed, 30 Jul 2025 12:46:34 +0100 [thread overview]
Message-ID: <aIoGGtrNZYjCfmk2@redhat.com> (raw)
In-Reply-To: <20250730072709.27077-1-thuth@redhat.com>
On Wed, Jul 30, 2025 at 09:27:09AM +0200, Thomas Huth wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> When compiling QEMU with --enable-ubsan there is a undefined behavior
> warning when running "make check":
>
> .../qga/commands-linux.c:452:15: runtime error: applying non-zero offset 5 to null pointer
> #0 0x55ea7b89450c in build_guest_fsinfo_for_pci_dev ..../qga/commands-linux.c:452:15
>
> Fix it by avoiding the additional pointer variable here and use an
> "offset" integer variable instead.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> ---
> v2: Use an integer offset variable instead for checking for a NULL pointer
>
> qga/commands-linux.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
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 :|
next prev parent reply other threads:[~2025-07-30 12:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-30 7:27 [PATCH v2] qga: Fix ubsan warning Thomas Huth
2025-07-30 8:28 ` Kostiantyn Kostiuk
2025-07-30 8:58 ` Thomas Huth
2025-07-30 11:46 ` Daniel P. Berrangé [this message]
2025-08-05 18:26 ` Michael Tokarev
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=aIoGGtrNZYjCfmk2@redhat.com \
--to=berrange@redhat.com \
--cc=kkostiuk@redhat.com \
--cc=michael.roth@amd.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@nongnu.org \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).