Date: Mon, 08 Oct 2012 12:25:04 +1030 From: Shane Ambler <FreeBSD@ShaneWare.Biz> To: Tijl Coosemans <tijl@coosemans.org> Cc: gerald@freebsd.org, FreeBSD-ports <freebsd-ports@freebsd.org> Subject: Re: Possible regression in i386 build with gcc 4.6 Message-ID: <50723278.7030009@ShaneWare.Biz> In-Reply-To: <5071FDC4.4060603@coosemans.org> References: <506B3E9A.1000905@ShaneWare.Biz> <5071FDC4.4060603@coosemans.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/10/2012 08:40, Tijl Coosemans wrote: >> inline long long >> atomic_exchange_and_add (volatile long long *at, long long x) >> { >> #ifdef USE_GCC_ATOMICS >> return __sync_fetch_and_add (at, x); >> #elif USE_TBB >> atomic<long long> *a = (atomic<long long> *)at; > > This cast is dangerous. It looks like atomic<long long> has 8 byte > alignment, but long long on i386 only has 4 byte alignment. > Could that be the cause of the seg fault? gcc42 just happens to generate it into a place that equals 8 byte align where gcc46 doesn't?
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50723278.7030009>