You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ji...@apache.org on 2020/02/10 03:20:38 UTC

[couchdb] 07/11: Disable JIT compiler on SpiderMonkey 60

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

jiangphcn pushed a commit to branch spidermonkey60-porting
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit d4328de2e99e568bb680e7e90f9588b14bfa8c09
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 ecedfbd..77bc2fb 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;