[PATCH libxxtrans 2/2] Fix alignment issues in FD passing code

Mark Kettenis mark.kettenis at xs4all.nl
Thu Nov 21 02:44:38 PST 2013


> Date: Wed, 20 Nov 2013 22:03:49 -0800
> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> 
> On 11/20/13 02:50 AM, Mark Kettenis wrote:
> >> Date: Tue, 12 Nov 2013 07:21:19 +0100
> >> From: Matthieu Herrb <matthiey at herrb.eu>
> >>
> >> On Mon, Nov 11, 2013 at 11:22:56PM +0100, Mark Kettenis wrote:
> >>> From: Mark Kettenis <kettenis at openbsd.org>
> >>>
> >>> A char array on the stack is not guaranteed to have more than byte
> >>> alignment.  This means that casting it to a 'struct cmsghdr' and
> >>> accessing its members may result in unaligned access.  This will
> >>> generate SIGBUS on strict alignment architectures like OpenBSD/sparc64.
> >>> The solution is to use a union to force proper alignment.
> >>>
> >>> Signed-off-by: Mark Kettenis <kettenis at openbsd.org>
> >>
> >> Reviewed-by: Matthieu Herrb <matthieu at herrb.eu>
> >
> > Given that the equivalent diff for xcb has been merged, iss Matthieu's
> > approval enough for me to push this?
> 
> Yes, please go ahead and push.

Thanks!  Pushed:
   0153d16..8b2c8aa  master -> master


More information about the xorg-devel mailing list