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

Different output compared with other runtimes when running the same wasm file. #2789

Open
abc767234318 opened this issue Nov 19, 2023 · 1 comment

Comments

@abc767234318
Copy link

abc767234318 commented Nov 19, 2023

I constructed a wasm binary with many exported function. I used the following command and compared the outputs of WAMR with other runtimes.

filea202224.zip

wasmtime compile filea202224.wasm
wasmer compile -o filea202224.aot  filea202224.wasm
wamrc -o filea202224.aot filea202224.wasm
wasmedge compile filea202224.wasm  filea202224.aot

The outputs of WAMR are different from other runtimes.
The outputs are as follows:

-----------------wasmtime-----------------

-----------------wasmer-----------------
warning: the output file has a wrong extension. We recommend using `filea202224.wasmu` for the chosen target
Compiler: cranelift
Target: x86_64-unknown-linux-gnu
✔ File compiled successfully to `filea202224.aot`.
-----------------wamr-----------------
WASM module load failed: duplicate export name

-----------------wasmedge-----------------
[2023-11-19 20:39:52.263] [info] compile start
[2023-11-19 20:39:52.268] [info] verify start
[2023-11-19 20:39:52.270] [info] optimize start
[2023-11-19 20:39:52.350] [info] codegen start
[2023-11-19 20:39:52.419] [info] output start
[2023-11-19 20:39:52.423] [info] compile done
[2023-11-19 20:39:52.424] [info] output start

I have analyzed it and I think the error may occurred at line 8970 and line 8971 of its wat file.
image

@lum1n0us
Copy link
Collaborator

lum1n0us commented Nov 21, 2023

thanks for reporting it. pleas try again with #2806. We might set a limitation on import names and exports, please join the discussion in #2806

wenyongh pushed a commit that referenced this issue Dec 1, 2023
Leave it as a limitation when import/export name contains '\00' in wasm file.
p.s. #2789
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this issue May 27, 2024
…ealliance#2806)

Leave it as a limitation when import/export name contains '\00' in wasm file.
p.s. bytecodealliance#2789
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

No branches or pull requests

2 participants