WasmEdge icon indicating copy to clipboard operation
WasmEdge copied to clipboard

AOT bug

Open L-jasmine opened this issue 2 years ago • 5 comments

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

L-jasmine avatar Nov 07 '22 08:11 L-jasmine

Hi @L-jasmine Could you please show the detailed steps to reproduce?

  1. What's the version of the rust toolchain? Stable or Nightly?
  2. Do I need to set up any external dependencies?
  3. What command should I use to build or run the example?

hydai avatar Nov 07 '22 08:11 hydai

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?

harry900831 avatar Dec 17 '22 11:12 harry900831

Hi @L-jasmine Could you please show the detailed steps to reproduce?

  1. What's the version of the rust toolchain? Stable or Nightly?
  2. Do I need to set up any external dependencies?
  3. What command should I use to build or run the example?
  1. rustc version = 1.65.0
  2. only rust just ok, dependencies will been install by cargo.
  3. cargo run --package aot --bin aot

L-jasmine avatar Dec 29 '22 09:12 L-jasmine

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 avatar Feb 09 '23 10:02 harry900831

@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.

L-jasmine avatar Feb 10 '23 06:02 L-jasmine

We fixed the OOM related issue in #4052, please try to upgrade to the latest version and retry this use case.

hydai avatar Mar 07 '25 05:03 hydai