On Sun, Jan 15, 2017 at 7:26 PM, Simon McVittie wrote:
> On Sun, 15 Jan 2017 at 17:06:00 +0100, John Paul Adrian Glaubitz wrote:
>> For the time being, Firefox upstream is now using the arm64 workaround on
>> sparc64
>> as well which fixed Firefox on sparc64. Firefox will be fixed on sparc64 with
>> version 53.
>
> Can you point those interested in this bug to a patch/commit/something that
> describes "the arm64 workaround"? Is it related to #839050?
I think Adrian refers to the upstream bugreport #1275204 [1] and two
fixes[2][3]. Any other patches I should backport? I attach a debdiff
for testing.
Regards,
Laszlo/GCS
[1] https://bugzilla.mozilla.org/show_bug.cgi?id=1275204
[2] https://hg.mozilla.org/integration/mozilla-inbound/rev/f9307a83e555
[3] https://hg.mozilla.org/integration/mozilla-inbound/rev/0cb0fe7e92f6
diff -Nru mozjs24-24.2.0/debian/changelog mozjs24-24.2.0/debian/changelog
--- mozjs24-24.2.0/debian/changelog 2017-01-07 01:42:14.0 +
+++ mozjs24-24.2.0/debian/changelog 2017-01-15 18:31:03.0 +
@@ -1,3 +1,9 @@
+mozjs24 (24.2.0-6) unstable; urgency=low
+
+ * Non-maintainer upload.
+
+ -- Laszlo Boszormenyi (GCS) Sun, 15 Jan 2017 18:31:03 +
+
mozjs24 (24.2.0-5.1) unstable; urgency=medium
* Non-maintainer upload.
diff -Nru mozjs24-24.2.0/debian/patches/Use_better_pre-processor_defines_for_sparc64.patch mozjs24-24.2.0/debian/patches/Use_better_pre-processor_defines_for_sparc64.patch
--- mozjs24-24.2.0/debian/patches/Use_better_pre-processor_defines_for_sparc64.patch 1970-01-01 00:00:00.0 +
+++ mozjs24-24.2.0/debian/patches/Use_better_pre-processor_defines_for_sparc64.patch 2017-01-15 18:31:03.0 +
@@ -0,0 +1,21 @@
+
+# HG changeset patch
+# User John Paul Adrian Glaubitz
+# Date 1481559553 -3600
+# Node ID f9307a83e5554072d3bc9167d88562cd5ad131d1
+# Parent 079ab396035168b99837846fa5a67dc540bfbfd9
+Bug 1275204 - js: Use better pre-processor defines for sparc64. r=glandium
+
+
+diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
+--- a/js/src/gc/Memory.cpp
b/js/src/gc/Memory.cpp
+@@ -313,7 +313,7 @@ gc::InitMemorySubsystem(JSRuntime *rt)
+ static inline void *
+ MapMemory(size_t length, int prot, int flags, int fd, off_t offset)
+ {
+-#if defined(__ia64__)
++#if defined(__ia64__) || (defined(__sparc__) && defined(__arch64__) && defined(__NetBSD__))
+ /*
+ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
+ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
diff -Nru mozjs24-24.2.0/debian/patches/Use_the_arm64_allocator_on_Linux_sparc64.patch mozjs24-24.2.0/debian/patches/Use_the_arm64_allocator_on_Linux_sparc64.patch
--- mozjs24-24.2.0/debian/patches/Use_the_arm64_allocator_on_Linux_sparc64.patch 1970-01-01 00:00:00.0 +
+++ mozjs24-24.2.0/debian/patches/Use_the_arm64_allocator_on_Linux_sparc64.patch 2017-01-15 18:31:03.0 +
@@ -0,0 +1,21 @@
+
+# HG changeset patch
+# User John Paul Adrian Glaubitz
+# Date 1482314917 -3600
+# Node ID 0cb0fe7e92f695be45e21c95907bbc6a12664f02
+# Parent f9307a83e5554072d3bc9167d88562cd5ad131d1
+Bug 1275204 - js: Use the arm64 allocator on Linux/sparc64. r=ehoogeveen
+
+
+diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
+--- a/js/src/gc/Memory.cpp
b/js/src/gc/Memory.cpp
+@@ -339,7 +339,7 @@ MapMemory(size_t length, int prot, int f
+ return MAP_FAILED;
+ }
+ return region;
+-#elif defined(__aarch64__)
++#elif defined(__aarch64__) || (defined(__sparc__) && defined(__arch64__) && defined(__linux__))
+/*
+ * There might be similar virtual address issue on arm64 which depends on
+ * hardware and kernel configurations. But the work around is slightly
diff -Nru mozjs24-24.2.0/debian/patches/series mozjs24-24.2.0/debian/patches/series
--- mozjs24-24.2.0/debian/patches/series 2017-01-07 01:42:14.0 +
+++ mozjs24-24.2.0/debian/patches/series 2017-01-15 18:31:03.0 +
@@ -6,3 +6,5 @@
m68k-support.patch
Disable-js-JIT-on-x32.patch
manually-mmap-on-arm64-to-ensure-high-17-bits-are-clear.patch
+Use_better_pre-processor_defines_for_sparc64.patch
+Use_the_arm64_allocator_on_Linux_sparc64.patch