Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm-parser exceeds the maximum stack size on large function names in the "name" section #922

Open
RSSchermer opened this issue May 28, 2021 · 0 comments

Comments

@RSSchermer
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant