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

Wrong execution reuslt on fast interpreter mode #3403

Closed
erxiaozhou opened this issue May 8, 2024 · 2 comments
Closed

Wrong execution reuslt on fast interpreter mode #3403

erxiaozhou opened this issue May 8, 2024 · 2 comments

Comments

@erxiaozhou
Copy link

Subject of the issue

WAMR on fast interpreter mode outputs a wrong result on the test case

Test case

finterp_wrong_val_select.zip

(module
  (type (;0;) (func))
  (type (;1;) (func (result i64)))
  (type (;2;) (func (param i32 i32 i32) (result i32)))
  (func (;0;) (type 1) (result i64)
    i64.const 122
    i32.const 1
    i32.const 2147483647
    i32.const -1
    i32.const 1
    if (param i32 i32 i32) (result i32)  ;; label = @1
      select
    else
      br 0 (;@1;)
      nop
      select
    end
    drop
    )
  (export "_start" (func 0))
  (export "to_test" (func 0)))

Your environment

  • Host OS: Ubuntu 20.04
  • Commit Id: 1c2a8fc

Steps to reproduce

  1. build WAMR on fast interpreter mode
  2. execute the command
iwasm --heap-size=0 -f "to_test" <test_case>

Expected behavior

The output is supposed to be the operand 122, which is introduced by the first instruction in the function.

122

Actual behavior

0x100000001:i64
@TianlongLiang
Copy link
Contributor

Hi, I tested it on my Ubuntu 20.04 local machine, and it output the expected answer:
image

@erxiaozhou
Copy link
Author

Hi, I tested it on my Ubuntu 20.04 local machine, and it output the expected answer

Thank you for your reply, you are right! I found the bug has been fixed by the version of commit id e44465d .

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