-
-
Notifications
You must be signed in to change notification settings - Fork 670
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
wasmtime wasm trap: integer divide by zero #2902
Comments
Try using |
It would also be nice if you used the same issue instead of creating multiple issues (I count 5 including this one). |
I'm learning AssemblyScript as I go. Not in isolation because I'm compiling WASM to JavaScript, which shows up in the JavaScript output by |
Bugs in |
I'm just sharing downstream impact. If you would prefer I don't file issues I can do that, too. |
I just don't want you to keep closing issues and making new ones, that's all... Does switching to |
It's organic. My interest in your gear and trying to figure it out should be good enough to field my inquiries and bug reports, as I interpret and encounter them. My other bug report was because The output from No. Didn't I change everythingto
|
|
That's it
|
@CountBleck FWIW I figured out how to get the expected output from
|
Bug description
This appears to be a bug in AssemblyScript
Everything works as expected until we get to factorial 13
The same algorithm compiled with Bytecode Alliance Javy
The same algorithm compiled to WASM from JavaScript source using Facebook's Static Hermes and WASI-SDK
AssemblyScript source compiled to JavaScript with TypeScript
tsc
, Deno, and/or Bun https://gist.github.com/guest271314/d50e4dd304cf7b3247128e124c619023Only the AssemblyScript version fails to process factorial 13. That failure winds up showing up in Binaryen
wasm2js
output from AssemblyScript compiled WASM, first as thisthat
911
should be9,11
.Then erroring and exiting when input is 13.
I'm thinking it's this part
What's going on with AssemblyScript here?
Steps to reproduce
Compile the above AssemblyScript to WASM using
Pass
stdin
or arguments to the WASM runtime '13 2'.Expected result:
What actually happens
AssemblyScript version
0.27.32
The text was updated successfully, but these errors were encountered: