Open
Description
Subject of the issue
Running AOT code on MacOS; works fine without --xip
, but with the flag I crash on access error when trying to call native code.
Test case
Your environment
- MacOS Sonoma 14.2
- WAMR 2.1.2
Steps to reproduce
Build a wasm-file and compile to aot with wamrc --target aarch64v8 --xip
Expected behavior
Should not crash
Actual behavior
Crashes with access error in non executable memory
Extra Info
Changing aot_loader.c:2163
from
sections = loader_mmap((uint32)total_size, false, NULL, 0);
to
sections = loader_mmap((uint32)total_size, true, NULL, 0);
fixes the issue for me.
Metadata
Metadata
Assignees
Labels
No labels