Debian Codegraph @

js/src/jit-test/tests/wasm/regress/bug2029735.js

raw
1 var dummy = {abc: 1};
2 // Non-Latin1 UTF-8 function name that hash-collides with the Latin1 "abc" atom.
3 // The unreachable trap exercises UTF8EqualsChars when building the error message.
4 var bytes = wasmTextToBinary('(module (func $"\\ee\\96\\95\\ea\\b5\\81\\04" (export "f") unreachable))');
5 var ex = null;
6 try {
7 new WebAssembly.Instance(new WebAssembly.Module(bytes)).exports.f();
8 } catch (e) {
9 ex = e;
10 }
11 assertEq(ex.stack.includes("\uE595\uAD41\x04@"), true);