From owner-freebsd-ports@FreeBSD.ORG Mon Oct 8 02:02:24 2012 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B57C106566B; Mon, 8 Oct 2012 02:02:24 +0000 (UTC) (envelope-from FreeBSD@shaneware.biz) Received: from ipmail05.adl6.internode.on.net (ipmail05.adl6.internode.on.net [IPv6:2001:44b8:8060:ff02:300:1:6:5]) by mx1.freebsd.org (Postfix) with ESMTP id 316478FC08; Mon, 8 Oct 2012 02:02:22 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EALEyclDLevdH/2dsb2JhbABFu2CES4IgAQEEAThBEAshEwMPCQMCAQIBRQYNAQcBAYd7BbgTi0+GEAOmGYMA Received: from ppp247-71.static.internode.on.net (HELO leader.local) ([203.122.247.71]) by ipmail05.adl6.internode.on.net with ESMTP; 08 Oct 2012 12:32:21 +1030 Message-ID: <50723278.7030009@ShaneWare.Biz> Date: Mon, 08 Oct 2012 12:25:04 +1030 From: Shane Ambler User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:15.0) Gecko/20120918 Thunderbird/15.0.1 MIME-Version: 1.0 To: Tijl Coosemans References: <506B3E9A.1000905@ShaneWare.Biz> <5071FDC4.4060603@coosemans.org> In-Reply-To: <5071FDC4.4060603@coosemans.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: gerald@freebsd.org, FreeBSD-ports Subject: Re: Possible regression in i386 build with gcc 4.6 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2012 02:02:24 -0000 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 *a = (atomic *)at; > > This cast is dangerous. It looks like atomic 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?