From owner-freebsd-ports@FreeBSD.ORG Tue Apr 30 16:37:31 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BAADB700; Tue, 30 Apr 2013 16:37:31 +0000 (UTC) (envelope-from jbeich@tormail.org) Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22]) by mx1.freebsd.org (Postfix) with ESMTP id 78A841DE2; Tue, 30 Apr 2013 16:37:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=internal.tormail.org) by outgoing.tormail.org with esmtp (Exim 4.72) (envelope-from ) id 1UXDYV-0007Og-1T; Tue, 30 Apr 2013 20:37:28 +0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tormail.org; s=tm; h=Message-Id:X-TorMail-User:Content-Type:MIME-Version:References:Date:In-Reply-To:Subject:Cc:To:From; bh=JqiCnNTNwHlLC8gchmp4Gm/Ay4IzlVrL6LEpqVOn9Wk=; b=tfFMwJvhHPw1AFixvWol51u2Off3iQC0ReHatisYWlpwzYbmXKhmGg3Mz7FYZwQXxkd59HUv0gK22Ksn9iyQGrCkDjoLVtmWBD+yRZHB1LsoSfwL9YmamN2nEtO7QVIBIYiKfeUU5vGU+r/+x6AQF1oeDZF1TEeI3N2myUnxMeA=; Received: from jbeich by internal.tormail.org with local (Exim 4.63) (envelope-from ) id 1UXDVA-0001b7-7U; Tue, 30 Apr 2013 16:34:02 +0000 From: Jan Beich To: Brandon Gooch Subject: Re: firefox build broken under clang 3.3 In-Reply-To: (Brandon Gooch's message of "Mon, 29 Apr 2013 22:28:56 -0500") Date: Tue, 30 Apr 2013 11:34:34 -0500 References: <20130419020021.GA16918@test.yahoo.com> <51716917.90101@smeets.im> <517187B9.40106@smeets.im> MIME-Version: 1.0 Content-Type: text/plain X-TorMail-User: jbeich Message-Id: <1UXDVA-0001b7-7U@internal.tormail.org> Cc: kit , Dimitry Andric , freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Apr 2013 16:37:31 -0000 Brandon Gooch writes: > On Fri, Apr 19, 2013 at 1:06 PM, Florian Smeets wrote: >> On 19.04.13 19:48, Dimitry Andric wrote: >>> On Apr 19, 2013, at 17:56, Florian Smeets wrote: >>> >>>> On 19.04.13 04:01, kit wrote: >>>>> updated current and now firefox and thunderbird both fail to build under >>>>> the new clang 3.3. has anyone seen this or know how to fix? >>>> >>>> The fix is here: >>>> >>>> http://tb.smeets.im/~flo/gecko-clang33-fixes.diff >>>> >>>> It will be committed after the freeze. >>> >>> Are these fixes from upstream? If not, it would be nice to send them there... >>> >>> >> >> patch-bug854936 is a workaround because we don't have >> http://llvm.org/viewvc/llvm-project?view=revision&revision=178950 yet. >> >> firefox-nightly (in our gecko svn repo) already compiles fine without >> patch-clang33 >> >> So everything should be fine :) >> >> Florian > > Thanks for fixing the build issues. > > Now, I've built Firefox with Clang, but the darn thing segfaults at > the drop of a hat: > > $ gdb /usr/local/bin/firefox firefox.core > ... > (gdb) bt > #0 0x00000008011eefaa in thr_kill () from /lib/libc.so.7 > #1 0x00000008024d254d in XRE_InstallX11ErrorHandler () > from /usr/local/lib/firefox/libxul.so > #2 0x0000000800f74116 in swapcontext () from /lib/libthr.so.3 > #3 0x0000000800f73d39 in sigaction () from /lib/libthr.so.3 > #4 0x00007ffffffff193 in ?? () > #5 0x0000000800f73c20 in sigaction () from /lib/libthr.so.3 > Previous frame inner to this frame (corrupt stack?) The faulting function is lost within crash handler. If you build firefox with # use DEBUG_FLAGS or set STRIP to empty explicitly CFLAGS += ${DEBUG_FLAGS} DEBUG_FLAGS += -O0 -g jaeger jit crash would look like http://lists.freebsd.org/pipermail/freebsd-current/2013-April/041165.html It doesn't happen on firefox23 with baseline jit[1] disabled via pref. A big change like zones (bug 759585) may have refactored code enough to not hit the clang bug. So, try either clang trunk or http://trillian.chruetertee.ch/freebsd-gecko/changeset/1256/trunk/www/firefox/files/patch-clang33 The latter pessimizes inlining for clang 3.2 as well. [1] baseline crashes in a different way https://bugzilla.mozilla.org/show_bug.cgi?id=860867 > > Rebuilding with debugging symbols provides no further insight, as that > seems to provide a work-around for whatever the root cause may be > (i.e. no more segfaults). DEBUG enables compile-time diagnostics and strips any -O* from CFLAGS.