0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
denoland-deno/cli/tests/testdata/run/wasm_unreachable.js

9 lines
380 B
JavaScript

// WebAssembly module containing a single function with an unreachable instruction
const binary = await Deno.readFile("./assets/unreachable.wasm");
const module = new WebAssembly.Module(binary);
const instance = new WebAssembly.Instance(module);
// Compare the stack trace with wasm_url.js, which compiles the WASM module with
// streaming APIs.
instance.exports.unreachable();