cfc4bba0a0
This patch maintains the previous default value of the flag controlling the max size of Wasm memories, but allows the limit to be raised on the command line. Bonus content: improve the multi-mapped mock allocator by falling back to regular allocation for small requests. More bonus content: make debug-mode Wasm tests faster. Bug: v8:6306 Change-Id: Idabae5734794b06e65d45b3a6165dbd488847f3f Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1981157 Auto-Submit: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Andreas Haas <ahaas@chromium.org> Commit-Queue: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#65681}
14 lines
459 B
JavaScript
14 lines
459 B
JavaScript
// Copyright 2017 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
load('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
// Flags: --wasm-max-mem-pages=49151
|
|
|
|
let builder = new WasmModuleBuilder();
|
|
const num_pages = 49152;
|
|
builder.addMemory(num_pages, num_pages);
|
|
// num_pages * 64k (page size) > kMaxInt.
|
|
assertThrows(() => builder.instantiate(), RangeError);
|