From owner-freebsd-current@FreeBSD.ORG Sun Dec 30 22:17:17 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B0D20C3C; Sun, 30 Dec 2012 22:17:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from tensor.andric.com (cl-327.ede-01.nl.sixxs.net [IPv6:2001:7b8:2ff:146::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE4D8FC08; Sun, 30 Dec 2012 22:17:17 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7:0:5d75:c766:7646:e7f3] (unknown [IPv6:2001:7b8:3a7:0:5d75:c766:7646:e7f3]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id EF0755C5A; Sun, 30 Dec 2012 23:17:15 +0100 (CET) Message-ID: <50E0BD66.4070609@FreeBSD.org> Date: Sun, 30 Dec 2012 23:17:10 +0100 From: Dimitry Andric Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:18.0) Gecko/20121128 Thunderbird/18.0 MIME-Version: 1.0 To: Nathan Whitehorn Subject: Re: clang 3.2 RC2 miscompiles libgcc? References: <20121227150724.GA1431@mole.fafoe.narf.at> <50DC65F5.6060004@freebsd.org> In-Reply-To: <50DC65F5.6060004@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2012 22:17:17 -0000 On 2012-12-27 16:15, Nathan Whitehorn wrote: > On 12/27/12 09:07, Stefan Farfeleder wrote: >> I noticed that most of my C++ applications in recent versions of FreeBSD >> head suddenly crash without me recompiling them. I tracked it down to >> r243830 which imported a new clang version. The new clang seems to >> compile libgcc in a wrong or at least incompatible way with what gcc >> expects. In fact, the breakage only occurs with libgcc compiled by a >> post-r243830 clang and an application compiled with g++ -O2. For me, the >> crash happens with boost::program_options, but I'm not sure if that is >> necessary for the crash. > > I've seen what I think is the same thing due to a miscompilation of > unwind-dw2.c that caused crashes related to cross-shared-object > exception handling. It seems to have been fixed with the 3.2 release but > I haven't tested it too thoroughly yet. I have been playing with Stefan's testcase for a while now, and while I can reproduce the crashes, I am still at a loss about the cause. It does seem to have something to do with throwing exceptions, but I am still not sure whether I am looking at a bug in boost, gcc, clang, or libgcc... Do you happen to have a smaller testcase, by any chance?