2020-08-07 06:22:41 +00:00
|
|
|
// Copyright 2020 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");
|
|
|
|
|
|
|
|
const builder = new WasmModuleBuilder();
|
|
|
|
let table = new WebAssembly.Table({element: 'anyfunc', initial: 2});
|
|
|
|
// Big size that causes an int32 overflow.
|
|
|
|
builder.addImportedTable('m', 'table', 4000000000);
|
2020-08-07 06:43:25 +00:00
|
|
|
assertThrows(() => builder.instantiate({m: {table: table}}), RangeError);
|