Date: Wed, 04 Jul 2012 17:08:30 +0200 From: Dimitry Andric <dim@FreeBSD.org> To: Taku YAMAMOTO <taku@tackymt.homeip.net> Cc: freebsd-current@freebsd.org Subject: Re: FYI: SIGBUS with world built by clang Message-ID: <4FF45C6E.1080000@FreeBSD.org> In-Reply-To: <20120704233316.70ec8654.taku@tackymt.homeip.net> References: <20120704233316.70ec8654.taku@tackymt.homeip.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2012-07-04 16:33, Taku YAMAMOTO wrote: > For people having SIGBUS with clang-build world + gcc-build binaries, > > > In short words, for any libraries (and never forget about rtld-elf!) > which are potentially called from arbitrary binaries, > compile them with either -mstackrealign or -mstack-alignment=8! > > The detail is as follows. > > I've observed that clang carelessly expects the stack being aligned at > 16 byte boundary. Eh, this is a requirement of the amd64 ABI. Any compiler that *doesn't* align the stack on 16-byte boundaries is basically broken. Or are you experiencing this on i386? Even there, 16-byte alignment would be much better in combination with SSE instructions (which arent' enabled by default, btw). Note that you would get the same issue with newer versions of gcc, which will also assume this alignment.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4FF45C6E.1080000>