From: Mark Kettenis kette...@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 struct
alignment architectures like
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 struct alignment architectures like
OpenBSD/sparc64. The canonical solution
On Mon, Nov 11, 2013 at 11:11:56PM +0100, Mark Kettenis wrote:
From: Mark Kettenis kette...@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.