Closed
Description
Version
16.1 and above, including 17.x
Platform
Linux
Subsystem
No response
What steps will reproduce the bug?
Lots of packages do something like this: (extract from long
)
try {
wasm = new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([
0, 97, 115, 109, 1, 0, 0, 0, 1, 13, 2, 96, 0, 1, 127, 96, 4, 127, 127, 127, 127, 1, 127, 3, 7, 6, 0, 1, 1$
])), {}).exports;
} catch (e) {
// no wasm support :(
}
I understand WASM support for ARMv6 has been removed in Node 16.1+ which is fine. But unfortunately the above code causes a hard crash in Node 16.1+ on ARMv6.
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Do not crash - instead throw an exception, so the code can fall back to non-WASM usage. (like long
tries to do, but fails because node just crashes.)
What do you see instead?
Hard crash.
#
# Fatal error in , line 0
# Liftoff bailout should not happen. Cause: Armv6 not supported
#
#
#
#FailureMessage Object: 0xb49faf50
Trace/breakpoint trap (core dumped)
Additional information
No response