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

Crash in fast interpreter #3090

Closed
erxiaozhou opened this issue Jan 26, 2024 · 1 comment
Closed

Crash in fast interpreter #3090

erxiaozhou opened this issue Jan 26, 2024 · 1 comment
Labels
bug Something isn't working fast interpreter fixed

Comments

@erxiaozhou
Copy link

Build commands

I compile the code with commit id 1977ad2.
Platform: Ubuntu 20.04
CPU: amd64
compile:

export CC=/usr/lib/llvm-16/bin/clang
export CXX=/usr/lib/llvm-16/bin/clang++
cd product-mini/platforms/linux/;rm -rf build
cmake  -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_REF_TYPES=1 -DWAMR_BUILD_SIMD=1 -DWASM_ENABLE_BULK_MEMORY=1 -DWAMR_BUILD_AOT=0 -DCMAKE_BUILD_TYPE=Release -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_LIBC_WASI=0 -DWAMR_BUILD_LIBC_BUILTIN=1 -Bbuild

execute:

iwasm --heap-size=0  <tc_name>

Cases

wamr_fast_interpreter_SIGSEGV.zip

Code in WAT

(module
  (type (;0;) (func))
  (type (;1;) (func (param i32)))
  (type (;2;) (func (param f64)))
  (type (;3;) (func (param i64 f32 i32)))
  (func (;0;) (type 0)
    i64.const 1522971970233122829
    f32.const -0x1.e0b49cp-60 (;=-1.62869e-18;)
    i32.const 21979
    i32.const 891
    i32.const 10275
    i32.const 10973
    if (param i32)  ;; label = @1
      drop
    else
      drop
      f64.const 0x1.b3d05980fc69cp+102 (;=8.63218e+30;)
      i32.const 2939
      if (param f64)  ;; label = @2
        drop
      else
        drop
      end
    end
    if (param i64 f32 i32)  ;; label = @1
      drop
      drop
      drop
    else
      drop
      drop
      drop
    end)
  (export "_start" (func 0))
  (export "to_test" (func 0)))

Actual output:

unhandled SIGSEGV, si_addr: (nil)
[1]    3544186 abort

Expected output:

No exception

@wenyongh
Copy link
Contributor

wenyongh commented Feb 2, 2024

@erxiaozhou thanks for reporting the issue, it was fixed with #3100, please pull the latest code to test again.

@wenyongh wenyongh added bug Something isn't working fixed fast interpreter labels Mar 14, 2024
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this issue May 27, 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 fast interpreter fixed
Projects
None yet
Development

No branches or pull requests

2 participants