You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I attempted to process a file test.wasm using wasm-opt with --remove-memory option, which generated test.opt.wasm. When trying to execute it in the wasmtime runtime, I encountered the following error:
$ wasmtime ./test.wasm
16871285034349708082
$ wasm-opt ./test.wasm --remove-memory -o ./test.opt.wasm
$ wasmtime ./test.opt.wasm
Error: failed to run main module `./test.opt.wasm`
Caused by:
0: failed to invoke command default
1: error while executing at wasm backtrace:
0: 0xb6 - <unknown>!<wasm function 7>
1: 0xc3 - <unknown>!<wasm function 6>
2: 0xcb - <unknown>!<wasm function 8>
2: memory fault at wasm address 0xfffffffa in linear memory of size 0x80000
3: wasm trap: out of bounds memory access
Environment Information:
wasm-opt version:
wasm-opt version 117 (version_117-31-g6e8fefe1e)
wasmtime version:
wasmtime-cli 18.0.3 (ff528a2ba 2024-03-12)
Operating System:
Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered:
That looks like the expected behavior. The wasm module is doing a store to address $2 = $0 - $1 = 0 - 6 = -6 which is a very large unsigned number, well beyond the Memory which is just 8 pages of 64K.
Hello,
I attempted to process a file test.wasm using
wasm-opt
with--remove-memory
option, which generatedtest.opt.wasm
. When trying to execute it in thewasmtime
runtime, I encountered the following error:Environment Information:
wasm-opt
version:wasm-opt version 117 (version_117-31-g6e8fefe1e)
wasmtime
version:wasmtime-cli 18.0.3 (ff528a2ba 2024-03-12)
Operating System:
Ubuntu 20.04.6 LTS
The text was updated successfully, but these errors were encountered: