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

The results of execution for a wasm binary are different from other wasm runtimes. #2561

Closed
abc767234318 opened this issue Sep 17, 2023 · 2 comments

Comments

@abc767234318
Copy link

I constructed a wasm binary with an exported function called "main". I used the following command and compared the outputs of WAMR with other runtimes.
file76.zip

wamrc -o file76.wasm.aot file76.wasm
iwasm --heap-size=0  -f main file76.wasm.aot

The outputs of WAMR are as follows:

Create AoT compiler with:
  target:        x86_64
  target cpu:    znver3
  target triple: x86_64-unknown-linux-gnu
  cpu features:  
  opt level:     3
  size level:    3
  output format: AoT file
Compile success, file file76.wasm.aot was generated.
<0x00004febf1445b2b 0x0000000000000000>:v128,<0x00004febf1445b2b 0x0000000000000000>:v128,<0x00004febf1445b2b 0x0000000000000000>:v128,<0x00004febf1445b2b 0x0000000000000000>:v128,<0x00004febf1445b2b 0x0000000000000000>:v128

While the outputs of the other runtimes like wasmtime and wasmer are:

-----------------wasmtime-----------------
warning: using `--invoke` with a function that returns values is experimental and may break in the future
1099511585569
1099511585569
1099511585569
1099511585569
1099511585569

-----------------wasmer-----------------
1099511585569 1099511585569 1099511585569 1099511585569 1099511585569
@lum1n0us
Copy link
Collaborator

#2584

wenyongh pushed a commit that referenced this issue Sep 28, 2023
According to the specification,
- fNxM_pmin/max returns v1 or v2 based on flt(v1,v2) result
- fNxM_min/max returns +/-NaN, +/-Inf, v1 or v2 based on more than
  flt(v1,v2) result

Fixes issue #2561.
@wenyongh
Copy link
Contributor

Close this issue since it has been fixed.

victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this issue May 27, 2024
…2584)

According to the specification,
- fNxM_pmin/max returns v1 or v2 based on flt(v1,v2) result
- fNxM_min/max returns +/-NaN, +/-Inf, v1 or v2 based on more than
  flt(v1,v2) result

Fixes issue bytecodealliance#2561.
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

3 participants