blob: ba76f3acb8eadcbef0b758246a51a10281609943 [file] [log] [blame]
const wasmCode = new Uint8Array([
0, 0x61, 0x73, 0x6d, 0x1, 0, 0, 0, 0x1, 0xe, 0x3, 0x60,
0x2, 0x7c, 0x7c, 0x1, 0x7f, 0x60, 0, 0, 0x60, 0, 0x1, 0x7f,
0x2, 0xe, 0x1, 0x3, 0x65, 0x6e, 0x76, 0x6, 0x6a, 0x73,
0x46, 0x75, 0x6e, 0x63, 0, 0, 0x3, 0x3, 0x2, 0x1, 0x2, 0x4,
0x5, 0x1, 0x70, 0x1, 0x1, 0x1, 0x5, 0x3, 0x1, 0, 0x2, 0x6,
0x15, 0x3, 0x7f, 0x1, 0x41, 0x80, 0x88, 0x4, 0xb, 0x7f, 0,
0x41, 0x80, 0x88, 0x4, 0xb, 0x7f, 0, 0x41, 0x80, 0x8, 0xb,
0x7, 0x2c, 0x4, 0x6, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79,
0x2, 0, 0xb, 0x5f, 0x5f, 0x68, 0x65, 0x61, 0x70, 0x5f,
0x62, 0x61, 0x73, 0x65, 0x3, 0x1, 0xa, 0x5f, 0x5f, 0x64,
0x61, 0x74, 0x61, 0x5f, 0x65, 0x6e, 0x64, 0x3, 0x2, 0x4,
0x6d, 0x61, 0x69, 0x6e, 0, 0x2, 0, 0x1f, 0x2, 0x2, 0, 0xb,
0x1a, 0, 0x44, 0x43, 0x43, 0x43, 0, 0, 0, 0xff, 0xff, 0x44,
0x43, 0x43, 0x43, 0, 0, 0, 0xff, 0xff, 0x10, 0x80, 0x80,
0x80, 0x80, 0, 0xb, 0, 0x4d, 0xb, 0x2e, 0x64, 0x65, 0x62,
0x75, 0x67, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x3d, 0, 0, 0,
0x4, 0, 0, 0, 0, 0, 0x4, 0x1, 0, 0, 0, 0, 0xc, 0, 0x23, 0,
0, 0, 0, 0, 0, 0, 0x44, 0, 0, 0, 0x5, 0, 0, 0, 0x1a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a, 0x2e, 0x64, 0x65,
0x62, 0x75, 0x67, 0x5f, 0x73, 0x74, 0x72, 0x63, 0x6c, 0x61,
0x6e, 0, 0, 0, 0, 0, 0, 0, 0x6f, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0x74, 0, 0, 0, 0, 0, 0, 0x34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0x62, 0, 0x69, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0x36, 0, 0, 0, 0x69, 0x74, 0x6a, 0x70, 0x69, 0x6b,
0x69, 0x2e, 0x24, 0, 0x6d, 0x61, 0x69, 0x6e, 0, 0x69, 0x41,
0x74, 0, 0, 0x29, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0
]);
try {
new WebAssembly.Module(wasmCode)
throw new Error('WebAssembly module should have failed to validate');
} catch (error) {
if (error.message !== "WebAssembly.Module doesn't parse at byte 585: Number of functions parsed (0) does not match the number of declared functions (2) (evaluating 'new WebAssembly.Module(wasmCode)')")
throw new Error(`Unexpected error: ${error.message}`);
}