webassemblyjs
webassemblyjs copied to clipboard
wasm-parser exceeds the maximum stack size on large function names in the "name" section
This problem originates from a wasm-bindgen application packaged with webpack and the wasm-pack-plugin. wasm-bindgen issue #2567 contains details on the error I encountered.
It seems that very large function names can cause parseNameSectionFunctions to exceed the stack size. It is not clear to me how this happens. I would have expected V8 to allocate large objects on the heap. Could it be because functionNames is marked const?
I will concur that the function name that seems to trigger the error is comically large. However, it results from (imho) reasonable Rust code.
I can share the pkg directory output by wasm-bindgen if that would help (which includes the wasm binary with the offending "name" section).