-
Notifications
You must be signed in to change notification settings - Fork 411
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
Make stack size configurable #479
Comments
Unfortunately the Rust compiler doesn't currently have a great default way to change the stack size right now. The stack size is configured by the linker currently (LLD), and what you've passed here is basically what you would otherwise need to do to change it, but it's a bug in the Rust compiler that it's not working. I think I've fixed this at rust-lang/rust#57337 |
@TorstenStueber could you let us know if you've seen the fix improve this behavior? any sort of update would be great :) thanks! |
I can confirm that is works now using the above setting in @ashleygwilliams feel free to close this issue if there is nothing to add from your side. |
💡 Feature description
Currently the stack-size for local variables of the generated wasm code is preconfigured to be 1048576 bytes. It is easy to reach this limit, e.g., the following program:
will require a stack of size of 1048584 – 8 bytes larger than the configured size. The generated wasm code will then try to access negative addresses in the linear memory and will throw an error
RuntimeError: "index out of bounds"
.I tried all kinds of options to configure the stack size, but to no avail. For exampe I used the
.cargo/config
file to change the stack size:However, the generated wasm code will always use a stack size of 1048576 bytes and will throw an error.
The text was updated successfully, but these errors were encountered: