-
-
Notifications
You must be signed in to change notification settings - Fork 320
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
Investigate wasm3 stack overflow during function compilation #3708
Comments
I'm not 100% sure this is the right interpretation of the error message you got! wasm3's error messages are sometimes a bit misleading. I got a very similar error message while working on the dev backend. The real issue was that I hadn't pushed enough values onto the Wasm stack machine but it was reported as an underflow in the "compiling function stack". To me that sounds like an issue inside wasm3 but in fact it was in the app. |
Also I'm confused about the code comment saying it fails on gen-wasm. I thought you had mentioned before that it was working there. Did that change? |
This test passed for me just now on |
the test also passes for me with |
Cool. Also works for me on x86-64 WSL Ubuntu with both |
It looks like the error only happens when built in release ( |
Aha! OK well I thought this issue had gone away but apparently not! I can look into it, so you don't need to worry about it unless you're interested in learning about it! My approaches to investigate things like this are
|
This test currently hits a stack memory limit while compiling a function inside wasm3:
https://github.com/rtfeldman/roc/blob/d4e81ccbd2f2c94725eb21af58cb948b33247898/crates/compiler/test_gen/src/gen_abilities.rs#L920-L940
I think the only way to resolve this, as far as I found, is to compile
wasm3
from source ourselves. See wasm3/wasm3-rs#22The text was updated successfully, but these errors were encountered: