MCPcopy Index your code
hub / github.com/nodejs/node / testMemoryGrowOutOfBoundsOffset

Function testMemoryGrowOutOfBoundsOffset

deps/v8/test/mjsunit/wasm/large-offset.js:7–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5d8.file.execute("test/mjsunit/wasm/wasm-module-builder.js");
6
7function testMemoryGrowOutOfBoundsOffset() {
8 print("testMemoryGrowOutOfBoundsOffset2");
9 var builder = new WasmModuleBuilder();
10 builder.addMemory(16, 128);
11 builder.addFunction("main", kSig_v_v)
12 .addBody([
13 kExprI32Const, 20,
14 kExprI32Const, 29,
15 kExprMemoryGrow, kMemoryZero,
16 // Assembly equivalent Move <reg>,0xf5fffff
17 // with wasm memory reference relocation information
18 kExprI32StoreMem, 0, 0xFF, 0xFF, 0xFF, 0x7A
19 ])
20 .exportAs("main");
21 var module = builder.instantiate();
22 assertTraps(kTrapMemOutOfBounds, module.exports.main);
23}
24
25testMemoryGrowOutOfBoundsOffset();

Callers 1

large-offset.jsFile · 0.70

Calls 7

addMemoryMethod · 0.95
addFunctionMethod · 0.95
instantiateMethod · 0.95
assertTrapsFunction · 0.70
printFunction · 0.50
exportAsMethod · 0.45
addBodyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…