Bug 1542292 - Bump 64-bit executable quota to ~2gb (r=jandem)
authorLuke Wagner <luke@mozilla.com>
Thu, 11 Apr 2019 23:40:57 +0000
changeset 469170 7beb238a0ea060d9f4237137a0c6a63b05d71420
parent 469169 5b7ea4e06802a74113755426fc1713d96fda7bbb
child 469171 940684cd10656796a3818cda438b47537b338b81
push id83000
push userlwagner@mozilla.com
push dateThu, 11 Apr 2019 23:42:16 +0000
treeherderautoland@7beb238a0ea0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs1542292
milestone68.0a1
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
Bug 1542292 - Bump 64-bit executable quota to ~2gb (r=jandem) Differential Revision: https://phabricator.services.mozilla.com/D26329
js/src/jit/ProcessExecutableMemory.h
--- a/js/src/jit/ProcessExecutableMemory.h
+++ b/js/src/jit/ProcessExecutableMemory.h
@@ -14,17 +14,21 @@
 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 = 1 * 1024 * 1024 * 1024;
+// This is the largest number which satisfies various alignment static
+// asserts that is <= INT32_MAX. The INT32_MAX limit is required for making a
+// single call to RtlInstallFunctionTableCallback(). (This limit could be
+// relaxed in the future by making multiple calls.)
+static const size_t MaxCodeBytesPerProcess = 2044 * 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