Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Apr 2013 20:23:34 +0200
From:      Dimitry Andric <dim@freebsd.org>
To:        Jan Beich <jbeich@tormail.org>
Cc:        Brandon Gooch <jamesbrandongooch@gmail.com>, kit <ktsin@acm.org>, Benjamin Kramer <benny.kra@gmail.com>, "freebsd-ports@freebsd.org ports" <freebsd-ports@freebsd.org>, =?iso-8859-1?Q?Rafael_Esp=EDndola?= <rafael.espindola@gmail.com>
Subject:   Re: firefox build broken under clang 3.3
Message-ID:  <ED3C5033-F932-4F56-895F-906873667C64@freebsd.org>
In-Reply-To: <1UXDVA-0001b7-7U@internal.tormail.org>
References:  <20130419020021.GA16918@test.yahoo.com> <51716917.90101@smeets.im> <F82EAEBA-C47D-4AC6-8FAE-AC3541B131C7@FreeBSD.org> <517187B9.40106@smeets.im> <CALBk6yLOV8fzdAY9y0_7SZvR9N8J-19FrwZjFv4t14ub8wmGiA@mail.gmail.com> <1UXDVA-0001b7-7U@internal.tormail.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Apr 30, 2013, at 18:34, Jan Beich <jbeich@tormail.org> wrote:
...
> The faulting function is lost within crash handler. If you build
> firefox with
>=20
>  # use DEBUG_FLAGS or set STRIP to empty explicitly
>  CFLAGS +=3D ${DEBUG_FLAGS}
>  DEBUG_FLAGS +=3D -O0 -g
>=20
> jaeger jit crash would look like
>=20
> =
http://lists.freebsd.org/pipermail/freebsd-current/2013-April/041165.html

The firefox crash in that post was with -O2, so it is most likely not =
due to the vectorizer then.

In any case, I have not been able to reproduce that either.  I have =
browsed stackoverflow.com for about 5 minutes, clicking a whole bunch of =
random articles and links, and no problems whatsoever occurred.  That is =
with the default www/firefox port, which seems to be the released =
Firefox 20.0, at its default settings, on amd64.


> 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
>=20
> =
http://trillian.chruetertee.ch/freebsd-gecko/changeset/1256/trunk/www/fire=
fox/files/patch-clang33
>=20
> The latter pessimizes inlining for clang 3.2 as well.
>=20
> [1] baseline crashes in a different way
>    https://bugzilla.mozilla.org/show_bug.cgi?id=3D860867

I do not like the workaround in that Mozilla bug, since it simply =
disables the vectorizer.  I can understand that software must always =
ship tomorrow, but it would have been nicer to attempt to figure out =
what is incorrectly optimized, and why...


>> 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).
>=20
> DEBUG enables compile-time diagnostics and strips any -O* from CFLAGS.

Indeed.  To work around this, use the following diff:

Index: Mk/bsd.port.mk
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- Mk/bsd.port.mk	(revision 316903)
+++ Mk/bsd.port.mk	(working copy)
@@ -1580,7 +1580,7 @@
 .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG)
 STRIP_CMD=3D	${TRUE}
 DEBUG_FLAGS?=3D	-g
-CFLAGS:=3D		${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
+CFLAGS:=3D		${CFLAGS} ${DEBUG_FLAGS}
 .endif
=20
 .if defined(NOPORTDOCS)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ED3C5033-F932-4F56-895F-906873667C64>