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

Unexpected behavior on fast interpreter mode #3467

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

Unexpected behavior on fast interpreter mode #3467

erxiaozhou opened this issue May 23, 2024 · 2 comments
Labels
bug Something isn't working fixed wasm loader

Comments

@erxiaozhou
Copy link

erxiaozhou commented May 23, 2024

Subject of the issue

The test case is expected to lead to an exception "unreachable". However, the warm on fast interpreter mode fails to raise the exception. Is it caused by the optimization in the fast interpreter?

Test case

tt_unreachable.zip

Your environment

  • Host OS: Ubuntu 20.04
  • Commit Id: f378edc

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

Exception: unreachable

Actual behavior

-1.861157e+19:f32
@wenyongh
Copy link
Contributor

@erxiaozhou thanks for spotting the issue! I submitted PR #3482 to fix it, please try again.

@wenyongh wenyongh added bug Something isn't working wasm loader labels May 30, 2024
wenyongh added a commit that referenced this issue May 31, 2024
#3482)

Fix several issues in wasm loader:
- Parse a block's type index with leb int32 instead leb uint32
- Correct dst dynamic offset of loop block arguments for opcode br
  when copying the stack operands to the arguments of loop block
- Free each frame_csp's param_frame_offsets when destroy loader ctx
- Fix compilation error in wasm_mini_loader.c
- Add test cases of failed issues

This PR fixes issue #3467 and #3468.
@wenyongh wenyongh added the fixed label May 31, 2024
@wenyongh
Copy link
Contributor

wenyongh commented Jun 3, 2024

Close the issue as it was fixed.

@wenyongh wenyongh closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed wasm loader
Projects
None yet
Development

No branches or pull requests

2 participants