-
Notifications
You must be signed in to change notification settings - Fork 774
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Loading an AOT module compiled with wamrc using the --enable-llvm-pgo flag fails at runtime during wasm_runtime_load with the error: AOT module load failed: invalid function code offset.
Compiling the exact same WASM module without --enable-llvm-pgo works perfectly and loads without any issues.
Version
- WAMR Version: 2.4.4 (binaries are from the official release)
To Reproduce
Steps to reproduce the behavior:
- Run
wamrcto compile:./wamrc.exe --target=x86_64 --opt-level=3 --size-level=0 --enable-simd --cpu=x86-64-v3 --enable-llvm-pgo --format=aot -o HavokPhysics.aot HavokPhysics.wasm - Run
HavokPhysics.aotwithiwasm:./iwasm.exe -f __wasm_call_ctors HavokPhysics.aot(not adding--gen-prof-fileas it does not affect the running) - See error:
AOT module load failed: invalid function code offset
Expected behavior
The AOT module should load successfully, just as it does when compiled without the --enable-llvm-pgo flag.
Actual Result
> ./wamrc.exe --target=x86_64 --opt-level=3 --size-level=0 --enable-simd --cpu=x86-64-v3 --enable-llvm-pgo --format=aot -o HavokPhysics.aot HavokPhysics.wasm
[05:55:35:083 - 7FF7F2205D10]: warning: a module with WASI apis should be either a command or a reactor
Create AoT compiler with:
target: x86_64
target cpu: x86-64-v3
target triple: x86_64-pc-windows-msvc
cpu features:
opt level: 3
size level: 0
output format: AoT file
Compile success, file HavokPhysics.aot was generated.
> ./iwasm.exe -f __wasm_call_ctors HavokPhysics.aot
[05:58:25:005 - 7FF7418E6780]: Warning: loader mmap memory address is not in the first 2 Gigabytes of the process address space.
[05:58:25:006 - 7FF7418E6780]: Warning: loader mmap memory address is not in the first 2 Gigabytes of the process address space.
[05:58:25:006 - 7FF7418E6780]: Warning: loader mmap memory address is not in the first 2 Gigabytes of the process address space.
AOT module load failed: invalid function code offset
(Please ignore the warnings, it appears without the --enable-llvm-pgo flag).
Desktop (please complete the following information):
- Arch: x64
- Board: A320M-HDV R4.0
- OS: Windows
- Version: 11
Additional context
HavokPhysics.wasm
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working