1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-13 02:52:54 -05:00
denoland-deno/tests/specs/run/wasm_unreachable/wasm_unreachable.js

10 lines
373 B
JavaScript
Raw Normal View History

// WebAssembly module containing a single function with an unreachable instruction
2024-11-05 01:39:05 -05:00
const binary = await Deno.readFile("./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();