[Spice-devel] [PATCH spice-server] build: do not warn about address-of-packed-member
Uri Lublin
uril at redhat.com
Mon May 13 13:04:33 UTC 2019
On 5/7/19 12:57 PM, Daniel P. Berrangé wrote:
> 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.
We'll try to fix those warnings, so currently this patch is postponed.
Note that this is the current state -- it's just that gcc 9 warns
about it.
>
> 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.
OK, if we can not fix them all, I'll add this information to the
commit message,
Thanks,
Uri.
>
> Regards,
> Daniel
>
More information about the Spice-devel
mailing list