| (type $I32Array (array i32)) |
| (global (export "g") (ref $I32Array) |
| (array.new $I32Array (i32.const 0) (i32.const -1)) |
| const WASM_MODULE_CODE = new Uint8Array([0x00, 0x61, 0x73, 0x6d, 0x01, 0x00, 0x00, 0x00, 0x01, 0x04, 0x01, 0x5e, 0x7f, 0x00, 0x06, 0x0c, 0x01, 0x64, 0x00, 0x00, 0x41, 0x00, 0x41, 0x7f, 0xfb, 0x06, 0x00, 0x0b, 0x07, 0x05, 0x01, 0x01, 0x67, 0x03, 0x00, 0x00, 0x12, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x04, 0x0b, 0x01, 0x00, 0x08, 0x49, 0x33, 0x32, 0x41, 0x72, 0x72, 0x61, 0x79]); |
| const module = new WebAssembly.Module(WASM_MODULE_CODE); |
| new WebAssembly.Instance(module); |
| if (error?.message.indexOf('byte 27') === -1) { |
| throw new Error("evaluation error contains wrong offset"); |