Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AOT relocation to aot_func_internal#n is generated on windows #2471

Closed
wenyongh opened this issue Aug 16, 2023 · 0 comments · Fixed by #2474
Closed

AOT relocation to aot_func_internal#n is generated on windows #2471

wenyongh opened this issue Aug 16, 2023 · 0 comments · Fixed by #2474

Comments

@wenyongh
Copy link
Contributor

Relocation to aot_func_internal#n is generated on windows when stack boundary check is enabled:

wamrc.exe --bounds-checks=1 -o test.aot test.wasm
iwasm test.aot

Error was reported:

AOT module load failed: resolve symbol aot_func_internal#0 failed

The machine code generated is like:

aot_func_internal#0:
  0000000000000000: 56                 push        rsi
  ...
aot_func#0:
  0000000000000050: 48 83 EC 28        sub         rsp,28h
  ...
  0000000000000075: E9 00 00 00 00     jmp         aot_func_internal#0

Unlike other platforms, the relocation isn't previously applied in the jmp instruction.

wenyongh added a commit that referenced this issue Aug 18, 2023
AOT relocation to aot_func_internal#n is generated by wamrc --bounds-checks=1.
Resolve the issue by applying the relocation in the compilation stage by wamrc and
don't generate these relocations in the AOT file.

Fixes #2471.
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this issue May 27, 2024
…nce#2474)

AOT relocation to aot_func_internal#n is generated by wamrc --bounds-checks=1.
Resolve the issue by applying the relocation in the compilation stage by wamrc and
don't generate these relocations in the AOT file.

Fixes bytecodealliance#2471.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant