2017-05-22 09:41:02 +00:00
|
|
|
// 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');
|
|
|
|
|
2020-01-09 17:08:51 +00:00
|
|
|
// Flags: --wasm-max-mem-pages=49151
|
2017-05-22 09:41:02 +00:00
|
|
|
|
|
|
|
let builder = new WasmModuleBuilder();
|
|
|
|
const num_pages = 49152;
|
|
|
|
builder.addMemory(num_pages, num_pages);
|
|
|
|
// num_pages * 64k (page size) > kMaxInt.
|
2020-02-21 17:00:27 +00:00
|
|
|
assertThrows(() => builder.instantiate(), WebAssembly.CompileError);
|