libwabt.js builds are broken with Emscripten upstream/tot
Noticed this here while attempting to update the wabt.js buildbot to GitHub Actions and decided to test with all of fastcomp, upstream and tot because why not.
Tracked this down so far to Module._malloc for example trying to call into Module['asm']['ya'], which does not exist.
I think I saw a similar bug to this before, and it was due to a bug in wasm2js that was fixed in emsdk-latest. In fact, I recently updated libwabt.js using emscripten version 1.39.13, and it seems to work. Strange that it would be failing on tot. Maybe @sbc100 or @kripken knows?
Not aware of any bugs there. It sounds like the import/export minification is wrong somehow? Weird.
Any chance it's using a js from one build with a wasm from another?
Might also have something to do with subtle changes since the MODULARIZE rework, but haven't yet been able to pinpoint. Another thing I noticed was that if I replace Module._malloc with just _malloc in the JS wrapper, the malloc issue goes away but others remain. Interestingly, switching all Module._wabt_something to Module['_wabt_something'] doesn't help as well.