We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have a simple C file:
#include <webassembly.h> export int contract_function(int bid) { return bid; }
compiled with:
wa-compile --bare -o example.wasm example.c
Which generates:
(module (type $0 (func (param i32) (result i32))) (import "env" "memory" (memory $0 1)) (table 0 anyfunc) (export "contract_function" (func $0)) (func $0 (type $0) (param $var$0 i32) (result i32) (block $label$0 i32 (i32.store offset=12 (i32.sub (i32.load offset=4 (i32.const 0) ) (i32.const 16) ) (get_local $var$0) ) (get_local $var$0) ) ) )
This generates a memory RuntimeError: memory access out of bounds when I try to load it.
RuntimeError: memory access out of bounds
However, when I compile using wasmfiddle I get:
(module (table 0 anyfunc) (memory $0 1) (export "memory" (memory $0)) (export "contract_function" (func $contract_function)) (func $contract_function (; 0 ;) (param $0 i32) (result i32) (get_local $0) ) )
Any ideas?
The text was updated successfully, but these errors were encountered:
I think it comes from LLVM, I already saw a similar error.
Sorry, something went wrong.
Hmm could it be that the precompiled binaries used are over a year old?
Yes, the binaries are quite old.
No branches or pull requests
I have a simple C file:
compiled with:
Which generates:
This generates a memory
RuntimeError: memory access out of bounds
when I try to load it.However, when I compile using wasmfiddle I get:
Any ideas?
The text was updated successfully, but these errors were encountered: