Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 11 Aug 2010 11:13:10 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        src-committers@FreeBSD.org, jilles@stack.nl, svn-src-all@FreeBSD.org, olli@fromme.com, olli@FreeBSD.org, svn-src-head@FreeBSD.org
Subject:   Re: svn commit: r211023 - head/usr.sbin/syslogd
Message-ID:  <86fwylecm1.fsf@ds4.des.no>
In-Reply-To: <20100810.141958.923962171922746057.imp@bsdimp.com> (M. Warner Losh's message of "Tue, 10 Aug 2010 14:19:58 -0600 (MDT)")
References:  <20100810.120103.69891821625677670.imp@bsdimp.com> <201008101956.o7AJu5ms044774@haluter.fromme.com> <20100810.141958.923962171922746057.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help
"M. Warner Losh" <imp@bsdimp.com> writes:
> You'll find that a number of structures are potentially already
> allocated with less than required alignment.  There's about a dozen
> places in the tree that would start to fail if we did this, or the
> stronger form of __aligned(8).  We could add that to the other
> structures, but then we're breaking ABI rules, I think.

__aligned(4) won't affect struct addrinfo since the sockaddr immediately
follows a socklen_t, which is 32 bits wide and has 32-bit alignment.  A
sockaddr_* allocated with malloc() will already be aligned, and so will
a sockaddr_* created on the stack.  The only problem is sockaddr_un,
because its size is not a multiple of 4, so if you allocate an array of
sockaddr_un, every other element will be misaligned.

DES
--=20
Dag-Erling Sm=C3=B8rgrav - des@des.no



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86fwylecm1.fsf>