firefox build broken under clang 3.3

Dimitry Andric dim at
Tue Apr 30 18:23:54 UTC 2013

On Apr 30, 2013, at 18:34, Jan Beich <jbeich at> wrote:
> The faulting function is lost within crash handler. If you build
> firefox with
>  # use DEBUG_FLAGS or set STRIP to empty explicitly
>  DEBUG_FLAGS += -O0 -g
> jaeger jit crash would look like

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 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
> The latter pessimizes inlining for clang 3.2 as well.
> [1] baseline crashes in a different way

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

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

Index: Mk/
--- Mk/	(revision 316903)
+++ Mk/	(working copy)
@@ -1580,7 +1580,7 @@
 .if defined(WITH_DEBUG) && !defined(WITHOUT_DEBUG)
-CFLAGS:=		${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS}
 .if defined(NOPORTDOCS)

More information about the freebsd-ports mailing list