Search code examples
webassembly

Could not recognise discriminant 0xD for type Section


I am trying to use wasm-split utility provided by Sentry (https://github.com/getsentry/symbolicator/tree/master/crates/wasm-split) like this:

./wasm-split-Windows-x86_64.exe main.wasm

main.wasm was compiled from C++ by emscripten.

However I get the following error:

Error: (root)[4]: Could not recognise discriminant 0xD for type Section

Caused by:
    Could not recognise discriminant 0xD for type Section

I have no idea what this means or where to go next from here. Google did not provide any answers either.


Solution

  • To answer my question. This is a bug in wasmbin, a dependency of wasm-split. See here: https://github.com/getsentry/symbolicator/issues/969