[Spice-devel] [PATCH spice-server] build: do not warn about address-of-packed-member

Daniel P. Berrangé berrange at redhat.com
Tue May 7 09:57:55 UTC 2019


On Tue, May 07, 2019 at 12:48:55PM +0300, Uri Lublin wrote:
> The gcc warning address-of-packed-member is new and on by
> default in gcc 9.
> 
> Many of the structures sent over the network are packed
> and with unaligned fields.
> 
> This breaks the build -- due to -Werror.
> Tell gcc to not warn about it.

Note that unaligned accesses are genuine bugs so ignoring these
mean spice is broken on certain architectures. sparc, arm7, hppa,
mips in particular will either sigbus or cause traps to kernel space
which are suuuuuper slow. Even on architectures where it is ok,
you often get a performance degradation.

If you don't care about these architectures that's obviously fine,
but I think the commit message should at least acknowledge that
these are genuine bugs being intentionally ignored.

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


More information about the Spice-devel mailing list