This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix strict-aliasing warning in resolv/res_hconf.c


On 05/26/2015 09:16 PM, Pedro Alves wrote:
> On 05/22/2015 12:34 PM, Florian Weimer wrote:
>>
>> But from a API risk perspective, adding the member is fine—I think,
>> others might disagree.  There is no ABI risk because of the existing
>> padding in struct sockaddr.
> 
> Is the union's alignment before/after the same?

Good point.

As far as I can tell, the alignment inside struct ifaddrs does not
change because there is an unsigned int member which forces 4 byte
alignment.  Otherwise the interface would not have worked on
strict-alignment architectures because struct sockaddr lacks an
alignment specification.  Wow.  This is stuff is *broken*.

-- 
Florian Weimer / Red Hat Product Security


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]