wasm-micro-runtime
wasm-micro-runtime copied to clipboard
Different output compared with other runtimes when running the same wasm file.
I constructed a wasm binary with many exported function. I used the following command and compared the outputs of WAMR with other runtimes.
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.
thanks for reporting it. ~pleas try again with https://github.com/bytecodealliance/wasm-micro-runtime/pull/2806~. We might set a limitation on import names and exports, please join the discussion in #2806