wabt icon indicating copy to clipboard operation
wabt copied to clipboard

libwabt.js builds are broken with Emscripten upstream/tot

Open dcodeIO opened this issue 5 years ago • 3 comments

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.

dcodeIO avatar May 12 '20 19:05 dcodeIO

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?

binji avatar May 13 '20 03:05 binji

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?

kripken avatar May 13 '20 15:05 kripken

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.

dcodeIO avatar May 13 '20 15:05 dcodeIO