-
Notifications
You must be signed in to change notification settings - Fork 269
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
unreachable
error and stack trace if compiled and extra memory, not otherwise
#2215
Comments
sorry, it's impossible to debug without having the code. Feel free to reopen until you got it. |
one thing is that you SHOULD NOT grow the memory by yourself, it's one way to destroy the language runtime (this case Rust's allocator). The runtime is NOT aware of the growth, so anything can happen. Edited: ^^ applies when you grow the memory during the execution, so irrelevant to your case after I quickly looked at your code. |
sorry, I think I found some regression in the optimizing compiler around api.Memory.Grow invoked by users. Will take care of this |
Since the introduction of optimizing compiler, the Memory.Grow by the users, which has the different call path than memory.grow instruction, didn't propagate the growth result onto compiler's ModuleInstance. Fixes #2215 Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Awesome, this fixes the issue I'd hit. |
Describe the bug
Follow-on to #2205 . This is the original bug; in 2205, I was trying to repro this with code I could share. I've given up on that, and this just has the (proprietary) wasm blob.
See workflow run, step 7
Calling
init()
in the wasm results in anunreachable
error and a stack trace, providedIf either of those is false the function returns without error (see preceding two steps in the worflow run).
To Reproduce
Clone the repo and run the commands listed in the README.
Alternately, run the github workflow. @ncruces and @mathetake I believe you'll have sufficient rights to do so, and I could add other wazero contributors if desired.
Expected behavior
init()
runs successfully, even compiled mode + extra memoryScreenshots
N/A
Environment (please complete the relevant information):
Additional context
Unfortunately I cannot provide source for the wasm binary.
I tried to copy out the source relevant to the stack trace but wasn't getting the error. It seems that either I missed something, or the code
rustc
produces is influenced by things that don't show up in the stack trace.The text was updated successfully, but these errors were encountered: