Backed out changeset 2b2f69d46d30 (bug 975182) for SM(arm) failures.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 21 Feb 2014 13:32:16 -0500
changeset 170268 048533052033a4939f64616af3857d71947a41d8
parent 170267 ab170f0289daba79de2a3aa96ece118b0d23a834
child 170269 625a7848187ae2cf10097a73d5615ec7e26bdbd3
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
bugs975182
milestone30.0a1
backs out2b2f69d46d30a4b45fd112f5f35f71ba83b64bd7
Backed out changeset 2b2f69d46d30 (bug 975182) for SM(arm) failures. CLOSED TREE
js/src/jit-test/tests/asm.js/testBug975182.js
js/src/jit/AsmJSSignalHandlers.cpp
deleted file mode 100644
--- a/js/src/jit-test/tests/asm.js/testBug975182.js
+++ /dev/null
@@ -1,18 +0,0 @@
-Function("\
-    g = (function(t,foreign){\
-        \"use asm\";\
-        var ff = foreign.ff;\
-        function f() {\
-            +ff()\
-        }\
-        return f\
-    })(this, {\
-        ff: arguments.callee\
-    }, ArrayBuffer(4096))\
-")()
-function m(f) {
-    for (var j = 0; j < 6000; ++j) {
-        f();
-    }
-}
-m(g);
--- a/js/src/jit/AsmJSSignalHandlers.cpp
+++ b/js/src/jit/AsmJSSignalHandlers.cpp
@@ -1026,20 +1026,20 @@ js::TriggerOperationCallbackForAsmJSCode
     AsmJSActivation *activation = rt->mainThread.asmJSActivationStackFromAnyThread();
     if (!activation)
         return;
 
     const AsmJSModule &module = activation->module();
 
 #if defined(XP_WIN)
     DWORD oldProtect;
-    if (!VirtualProtect(module.codeBase(), module.functionBytes(), PAGE_READWRITE, &oldProtect))
+    if (!VirtualProtect(module.codeBase(), module.functionBytes(), PAGE_NOACCESS, &oldProtect))
         MOZ_CRASH();
 #else  // assume Unix
-    if (mprotect(module.codeBase(), module.functionBytes(), PROT_READ|PROT_WRITE))
+    if (mprotect(module.codeBase(), module.functionBytes(), PROT_NONE))
         MOZ_CRASH();
 #endif
 }
 
 #if defined(MOZ_ASAN) && defined(JS_STANDALONE)
 // Usually, this definition is found in mozglue (see mozglue/build/AsanOptions.cpp).
 // However, when doing standalone JS builds, mozglue is not used and we must ensure
 // that we still allow custom SIGSEGV handlers for asm.js and ion to work correctly.