You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Wasm decoding failed: table index X out of bounds #753
The build doesn't produce a corrupted wasm binary when the handler definition and setInterval invocation from print(self: &Julia) is removed.
Any idea why this can happen?
I didn't find any information on “table index” and wasm2wat (all binaryen tools, actually) refused to produce a wat output: 0000241: error: invalid export table index: 99.
Removing the preprocess invocation and updating all webassembly-dependencies of webpack to ^1.7.5 did not fix this issue. I will dig deeper and report.
Activity
19h commentedon Aug 26, 2018
Addendum: I'm not exactly sure, but it seems to be related to the webpack build process (I expected the wasm file not to change).
File produced through cargo -> wasm-bindgen -> wasm-opt: ares_bg.wasm.zip
File produced through webpack from the wasm-opt artifact: db7d1aa3f3ce8a64a0a3.wasm.zip
What kind of aggressive optimization is the webpack build doing? 😕
19h commentedon Aug 26, 2018
Here's a binary diff of what the webpack build optimization strips from the original wasm-opt artifact:
xtuc commentedon Aug 26, 2018
Quite a few - https://github.com/webpack/webpack/blob/master/lib/wasm/WebAssemblyGenerator.js.
After a quick look at the binary, it seems that some strings are not correctly encoded and the table error you get is a side-effect.
webpack/webpack#7732 could fix it.
19h commentedon Aug 26, 2018
Hang on, I'll merge your webpack tree and report back.
19h commentedon Aug 26, 2018
Removing the
preprocessinvocation and updating all webassembly-dependencies of webpack to ^1.7.5 did not fix this issue. I will dig deeper and report.19h commentedon Aug 26, 2018
Revising my previous statement: cleaning the workspace and the re-running the build with your tree does indeed fix the issue.
alexcrichton commentedon Aug 26, 2018
Ok great! Sounds like this was an upstream webpack issue? If that's the case I'm gonna close, but if it's still an issue here I can certainly reopen!
xtuc commentedon Aug 27, 2018
Cool! I'll put more pressure to get that merged/released, but need to also update it. If you subscribe to the PR, you'll follow that.