binaryen
binaryen copied to clipboard
wasm2js: unhandled unaligned store, UNREACHABLE executed at, Aborted
Trying to run wasm2js
on HavokPhysics.wasm
in https://github.com/BabylonJS/Babylon.js/tree/master/packages/tools/babylonServer/public/havok
Getting the error:
./wasm2js ../../../Babylon.js/packages/tools/babylonServer/public/havok/HavokPhysics.wasm -o ../../../Babylon.js/packages/tools/babylonServer/public/havok/HavokPhysics.js
unhandled unaligned store
UNREACHABLE executed at /src/src/passes/AlignmentLowering.cpp:334!
Aborted
Using version: https://github.com/WebAssembly/binaryen/releases/tag/version_112
Linux: binaryen-version_112-x86_64-linux.tar.gz
Looks like the basic types are handled in that switch, so what is likely the problem is that there is an unaligned v128 store, that the pass would need to be updated to handle.
I'm sorry, but I'm having the same issue. I'm just new to using Linux, so I have no idea what kripken is talking about, so if he is talking about how to fix it, I can't tell. Can someone please dumb it down for me?
To fix the problem, we need to write more code in src/passes/AlignmentLowering.cpp around line 334. That code needs to break stores of 16-byte values into multiple stores of 1 byte each.