Backed out changeset 9a6c6c9c8119 (bug 1542292) for causing build bustages. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Tue, 09 Apr 2019 17:10:31 +0300
changeset 468568 22602954561c86b58ab9fde7a019b361aba7080a
parent 468567 3e0f17ff1cccb20dc339268450f654288df23fe2
child 468569 2b272977a1e5267db194b3dc33fe4f240a226dd6
push id82668
push usercsabou@mozilla.com
push dateTue, 09 Apr 2019 14:12:53 +0000
treeherderautoland@2b272977a1e5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1542292
milestone68.0a1
backs out9a6c6c9c81199563416ffe9795b76c382d736f41
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backed out changeset 9a6c6c9c8119 (bug 1542292) for causing build bustages. CLOSED TREE
js/src/jit/ProcessExecutableMemory.h
js/src/wasm/WasmCode.cpp
--- a/js/src/jit/ProcessExecutableMemory.h
+++ b/js/src/jit/ProcessExecutableMemory.h
@@ -14,17 +14,17 @@
 namespace js {
 namespace jit {
 
 // Limit on the number of bytes of executable memory to prevent JIT spraying
 // attacks.
 #if JS_BITS_PER_WORD == 32
 static const size_t MaxCodeBytesPerProcess = 140 * 1024 * 1024;
 #else
-static const size_t MaxCodeBytesPerProcess = 2ull * 1024 * 1024 * 1024;
+static const size_t MaxCodeBytesPerProcess = 1 * 1024 * 1024 * 1024;
 #endif
 
 // Limit on the number of bytes of code memory per buffer.  This limit comes
 // about because we encode an unresolved relative unconditional branch during
 // assembly as a branch instruction that carries the absolute offset of the next
 // branch instruction in the chain of branches that all reference the same
 // unresolved label.  For this architecture to work, no branch instruction may
 // lie at an offset greater than the maximum forward branch distance.  This is
--- a/js/src/wasm/WasmCode.cpp
+++ b/js/src/wasm/WasmCode.cpp
@@ -109,18 +109,17 @@ static uint32_t RoundupCodeLength(uint32
 }
 
 /* static */
 UniqueCodeBytes CodeSegment::AllocateCodeBytes(uint32_t codeLength) {
   if (codeLength > MaxCodeBytesPerProcess) {
     return nullptr;
   }
 
-  static_assert(MaxCodeBytesPerProcess <= (1u << 31),
-                "rounding won't overflow");
+  static_assert(MaxCodeBytesPerProcess <= INT32_MAX, "rounding won't overflow");
   uint32_t roundedCodeLength = RoundupCodeLength(codeLength);
 
   void* p =
       AllocateExecutableMemory(roundedCodeLength, ProtectionSetting::Writable,
                                MemCheckKind::MakeUndefined);
 
   // If the allocation failed and the embedding gives us a last-ditch attempt
   // to purge all memory (which, in gecko, does a purging GC/CC/GC), do that