Bug 1444668 - Avoid allocating large AssemblerBuffers. r=luke, r=bbouvier, a=RyanVM

This commit is contained in:
Jan de Mooij 2018-04-10 15:00:49 +02:00 • committed by Roy Tam
commit 52269fa01a
5 changed files with 49 additions and 9 deletions

View file

@ -385,14 +385,6 @@ class PageBitSet
#endif
};
// 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 = 128 * 1024 * 1024;
#else
static const size_t MaxCodeBytesPerProcess = 1 * 1024 * 1024 * 1024;
#endif
// Per-process executable memory allocator. It reserves a block of memory of
// MaxCodeBytesPerProcess bytes, then allocates/deallocates pages from that.
//