Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Apr 2013 04:18:00 -0400
From:      "Mikhail T." <mi+thun@aldan.algebra.com>
To:        gecko@freebsd.org
Subject:   firefox crashes
Message-ID:  <5174F238.6030704@aldan.algebra.com>

next in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------050305000400030202030307
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

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


--------------050305000400030202030307
Content-Type: text/plain; charset=KOI8-U;
 name="patch-llabs"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="patch-llabs"

--- 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);

--------------050305000400030202030307--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5174F238.6030704>