-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Crash when Wasmtime invokes nondefault AssemblyScript function #3474
Comments
There are two kinds of wasi programs:
If assemblyscript wants to allow invoking functions other than |
@itowlson are you saying that we aren't calling the module |
WASI's |
I see, I was mixing up My bad, please disregard the above comment. |
I originally raised this at AssemblyScript (AssemblyScript/assemblyscript#2099) but they appear to view it as an issue with Wasm runtimes; they have raised a Wasmer bug but my use case is Wasmtime.
Consider the following AssemblyScript program:
Compile this using
Now run
wasmtime run --invoke foo ./build/untouched.wasm
It crashes with:
The crash occurs within the AssemblyScript garbage collector while trying to allocate a string.
I believe the reason AssemblyScript considers this a runtime bug is that they set up the GC in the implicit
_start
function. Callingwasmtime run --invoke foo
bypasses_start
and therefore the GC is not set up when it needs to do the allocation.This also occurs when invoking the function via the Wasmtime Rust crate hosted in my own program (deislabs/wagi#128).
There are additional details and discussion in the original AssemblyScript issue AssemblyScript/assemblyscript#2099.
The text was updated successfully, but these errors were encountered: