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 misaligned access accessing HEADER struct in res_query.c


On 2016-06-15 10:43 AM, Florian Weimer wrote:
I don't think the packed derivative affects the layout of HEADER given
the way the fields are
arranged.

I verified that it changes alignment, even on x86_64. That's the intent, and it results in a layout change (if this struct is used as a part of other structs, for example).

I'm suggesting this be done in res_query.c where we we need byte alignment. Nothing else would have access to this typedef, so it couldn't affect the layout of any other structs.

Dave

--
John David Anglin  dave.anglin@bell.net


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