firefox crashes

Mikhail T. mi+thun at aldan.algebra.com
Mon Apr 22 08:18:08 UTC 2013


Hello!

Firefox-20 would not build with the regular compiler, so I installed the
shiny new gcc-4.8

This builds (though the attached patch is required -- at least, on
i386), but dies on startup from "illegal instruction".

If I start under gdb, instead of SIGILL, I see segmentation fault --
inside XRE_AddStaticComponent in libxul.so

Using -safe-mode does not help. I tried switching to 17-esr, but seeing
the same problem. The OS 8.2-STABLE/i386, running on a dual Opteron system.

Any clues? Thanks!

    -mi

-------------- next part --------------
--- xpcom/io/nsMultiplexInputStream.cpp	2013-03-26 18:18:07.000000000 -0400
+++ xpcom/io/nsMultiplexInputStream.cpp	2013-04-22 01:20:53.000000000 -0400
@@ -20,6 +20,6 @@
 #include "nsIIPCSerializableInputStream.h"
 #include "mozilla/ipc/InputStreamUtils.h"
-#include <cstdlib> // for std::abs(int/long)
-#include <cmath> // for std::abs(float/double)
+#include <cstdlib> // for llabs(int/long)
+#include <cmath> // for llabs(float/double)
 
 using namespace mozilla::ipc;
@@ -512,5 +512,5 @@
 
             // See if we have enough data in the current stream.
-            if (std::abs(remaining) < streamPos) {
+            if (llabs(remaining) < streamPos) {
                 rv = stream->Seek(NS_SEEK_END, remaining);
                 NS_ENSURE_SUCCESS(rv, rv);
@@ -520,5 +520,5 @@
 
                 remaining = 0;
-            } else if (std::abs(remaining) > streamPos) {
+            } else if (llabs(remaining) > streamPos) {
                 if (i > oldCurrentStream ||
                     (i == oldCurrentStream && !oldStartedReadingCurrent)) {
@@ -530,5 +530,5 @@
                     NS_ENSURE_SUCCESS(rv, rv);
 
-                    int64_t newPos = streamPos + NS_MIN(avail, std::abs(remaining));
+                    int64_t newPos = streamPos + NS_MIN(avail, llabs(remaining));
 
                     rv = stream->Seek(NS_SEEK_END, -newPos);


More information about the freebsd-gecko mailing list