WasmEdge
                                
                                
                                
                                    WasmEdge copied to clipboard
                            
                            
                            
                        AOT bug
Description
Current State
run a wasm is ok,
but after aot, it will return error with
[error] execution failed: out of bounds memory access, Code: 0x88
Expected
Environment
- Hardware Architecture:
 - Operating system: Ubuntu 18
 
The following information is optional. Please provide them only if you have built from source.
- C++ Compiler version:
 - CMake version:
 - CMake flags: 
-DCMAKE_BUILD_TYPE=Release -DWASMEDGE_BUILD_AOT_RUNTIME=ON - Boost version:
 
Steps to Reproduce
https://github.com/second-state/wasmedge_asyncify/blob/preview/examples/aot/src/main.rs
Hi @L-jasmine Could you please show the detailed steps to reproduce?
- What's the version of the rust toolchain? Stable or Nightly?
 - Do I need to set up any external dependencies?
 - What command should I use to build or run the example?
 
Hi @L-jasmine,
According to your description, I guess that your problem may be fixed by this pull request: https://github.com/WasmEdge/WasmEdge/pull/2166. Could you help verify it?
Hi @L-jasmine Could you please show the detailed steps to reproduce?
- What's the version of the rust toolchain? Stable or Nightly?
 - Do I need to set up any external dependencies?
 - What command should I use to build or run the example?
 
- rustc version = 1.65.0
 - only rust just ok, dependencies will been install by cargo.
 cargo run --package aot --bin aot
Hi @L-jasmine, I've tried to trace where's the bug on this issue several weeks ago but end up failing to narrow down the problem. I'm working on other issue lately. Is there any update for this? Can you reproduce this error with the WasmEdge Rust SDK?
@harry900831  I can reproduce it on wasmedge version 0.12.0-alpha.1-4-ga1bb7135 Ubuntu-18.
https://github.com/second-state/wasmedge_asyncify/blob/42ea6fe99675865ad2f017816a015903f327722e/examples/aot/src/main.rs#L72-L75
If you use L73(use wasm/hello.wasm) , it is ok.
But if use L75 (a aot wasm from wasm/hello.wasm), it will fail.
We fixed the OOM related issue in #4052, please try to upgrade to the latest version and retry this use case.