[Pkg-mongodb-maintainers] [pkg-mongodb] 02/05: Fix spidermonkey-GC-related + GCC 6 segfaults
Apollon Oikonomopoulos
apoikos at moszumanska.debian.org
Sun Nov 19 15:29:10 UTC 2017
This is an automated email from the git hooks/post-receive script.
apoikos pushed a commit to branch stable/stretch
in repository pkg-mongodb.
commit 06be96043231a1d8d12373a98d2c098d0ac950e6
Author: Apollon Oikonomopoulos <apoikos at debian.org>
Date: Mon Sep 25 14:32:57 2017 +0300
Fix spidermonkey-GC-related + GCC 6 segfaults
Apparently, mozjs 38 and up to 49 is prone to segfaults at GC time
when built using GCC 6 or later. I've seen MongoDB crash a number of
times with only mozjs GC operations in the stack trace.
Fix this by disabling a couple of GCC 6+ optimizations, as discussed in
https://trac.wildfiregames.com/ticket/4053 and
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14.
Closes: #876755
(cherry picked from commit d19fc4322cb71dd1d903820ec6ee6e3234f5e942)
---
debian/patches/fix-mozjs-38-segfaults.patch | 29 +++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 30 insertions(+)
diff --git a/debian/patches/fix-mozjs-38-segfaults.patch b/debian/patches/fix-mozjs-38-segfaults.patch
new file mode 100644
index 0000000..fbcd151
--- /dev/null
+++ b/debian/patches/fix-mozjs-38-segfaults.patch
@@ -0,0 +1,29 @@
+Author: Apollon Oikonomopoulos <apoikos at debian.org>
+Description: Fix mozjs-related segfaults when built with GCC >=6
+ Apparently, mozjs 38 and up to 49 is prone to segfaults at GC time when built
+ using GCC 6 or later. I've seen MongoDB crash a number of times with only
+ mozjs GC operations in the stack trace. We're also currently having a segfault
+ on ARM64 that is probably related (#871906).
+ .
+ According to https://trac.wildfiregames.com/ticket/4053 and
+ https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14, disabling a couple of
+ optimizations should fix this.
+Last-Update: 2017-09-25
+Forwarded: no
+--- a/src/third_party/mozjs-38/SConscript
++++ b/src/third_party/mozjs-38/SConscript
+@@ -92,6 +92,14 @@
+ 'platform/' + env["TARGET_ARCH"] + "/" + env["TARGET_OS"] + "/include",
+ ])
+
++# Debian
++# Apparently, Spidermonkey 38 (and up to 49) is prone to segfaults at GC time
++# when built with GCC 6 or later. Disabling the following optimizations fixes
++# this.
++# See https://trac.wildfiregames.com/ticket/4053 and
++# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70526#c14 for more information
++env.Append(CXXFLAGS=["-fno-schedule-insns2", "-fno-delete-null-pointer-checks"])
++
+ sources = [
+ "extract/js/src/builtin/RegExp.cpp",
+ "extract/js/src/frontend/Parser.cpp",
diff --git a/debian/patches/series b/debian/patches/series
index 6eb1c4c..ecf1d62 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -9,3 +9,4 @@ CVE-2016-6494.patch
use-mmapv1-on-i386
fix-wt-checksum-on-arm64
arm64-48bit-va-compat.patch
+fix-mozjs-38-segfaults.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mongodb/pkg-mongodb.git
More information about the Pkg-mongodb-maintainers
mailing list