[wasm] Bump maximum code space to ~4GB
Big partners are still hitting the code space limit, especially when debugging larger wasm apps. The limits was bumped to 2GB in August, but we already have security clearance to increase it to 4GB. A limit of exactly 4GB is problematic on 32-bit systems, and also on 64-bit we seem to store the limit in a uint32_t sometimes. Thus choose a limit slighly below 4GB, such that it fits in a 32-bit integer. R=ecmziegler@chromium.org Bug: chromium:1143118 Change-Id: If37f87280264c395cf73b3cc3bf6f7b1b27c46d2 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2505768 Commit-Queue: Clemens Backes <clemensb@chromium.org> Reviewed-by: Emanuel Ziegler <ecmziegler@chromium.org> Cr-Commit-Position: refs/heads/master@{#70882}
This commit is contained in:
parent
def7dc3d4b
commit
dd84c39370
@ -196,9 +196,8 @@ constexpr int kDoubleSizeLog2 = 3;
|
||||
|
||||
// Total wasm code space per engine (i.e. per process) is limited to make
|
||||
// certain attacks that rely on heap spraying harder.
|
||||
// This limit was increased to 2GB in August 2020 and we have security clearance
|
||||
// to increase to 4GB if needed.
|
||||
constexpr size_t kMaxWasmCodeMB = 2048;
|
||||
// Just below 4GB, such that {kMaxWasmCodeMemory} fits in a 32-bit size_t.
|
||||
constexpr size_t kMaxWasmCodeMB = 4095;
|
||||
constexpr size_t kMaxWasmCodeMemory = kMaxWasmCodeMB * MB;
|
||||
|
||||
#if V8_HOST_ARCH_64_BIT
|
||||
|
Loading…
Reference in New Issue
Block a user