-
Notifications
You must be signed in to change notification settings - Fork 745
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
Raising the limit on the number of locals in input files #6968
Comments
Good point, I agree we should change this. I think the check should error on binaryen/src/wasm/wasm-binary.cpp Lines 471 to 474 in ccef354
And that warning should be during writing, not reading. Would you like to open a PR for that? |
Ok, I'll do that. @tlively mentioned an issue with allocation failures on CI as a justification for this limit. I'm not sure what he meant. |
Oh, we do allocate a vector for locals (whose elements are pointers, so 8 bytes in 64-bit), so trying to allocate one of length |
This raises the number of locals accepted by the binary parser to the absolute limit in the spec. A warning is now printed when writing a binary file if the Web limit of 50,000 locals is exceeded. This fixes WebAssembly#6968.
This raises the number of locals accepted by the binary parser to the absolute limit in the spec. A warning is now printed when writing a binary file if the Web limit of 50,000 locals is exceeded. This fixes WebAssembly#6968.
This raises the number of locals accepted by the binary parser to the absolute limit in the spec. A warning is now printed when writing a binary file if the Web limit of 50,000 locals is exceeded. Fixes #6968.
The
wasm_of_ocaml
compiler is generating code using a fresh local variable for each intermediate value. We rely onwasm-opt
to optimize this. Since #6677, the binary parser will reject functions with more then 50,000 locals. We are currently reaching this limit on some large programs. Maybe it would make sense to raise this limit sincewasm-opt
is expected to take as input unoptimized code. Or maybe there should be an option to lift the limit?The text was updated successfully, but these errors were encountered: