You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2020/01/13 22:25:55 UTC

[couchdb] 01/01: Disable JIT compiler on SpiderMonkey 60

This is an automated email from the ASF dual-hosted git repository.

davisp pushed a commit to branch disable-jit-on-sm-60
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 0b503a5783032529d6365f700347227068c034b2
Author: Paul J. Davis <pa...@gmail.com>
AuthorDate: Mon Jan 13 16:24:13 2020 -0600

    Disable JIT compiler on SpiderMonkey 60
    
    We've had a number of segfaults in the `make javascript` test suite. The
    few times we've been able to get core dumps all appear to indicate
    something wrong in the JIT compiler. Disabling the JIT compilers appears
    to prevent these segfaults.
---
 src/couch/priv/couch_js/60/main.cpp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/couch/priv/couch_js/60/main.cpp b/src/couch/priv/couch_js/60/main.cpp
index e36bc61..e78dbb4 100644
--- a/src/couch/priv/couch_js/60/main.cpp
+++ b/src/couch/priv/couch_js/60/main.cpp
@@ -416,6 +416,9 @@ main(int argc, const char* argv[])
     if(cx == NULL)
         return 1;
 
+    JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_BASELINE_ENABLE, 0);
+    JS_SetGlobalJitCompilerOption(cx, JSJITCOMPILER_ION_ENABLE, 0);
+
     if (!JS::InitSelfHostedCode(cx))
         return 1;