Stream: git-wasmtime

Topic: wasmtime / issue #5832 cranelift-jit: Panic when calling ...


view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2023 at 18:27):

afonso360 opened issue #5832:

:wave: Hey,

Fuzzgen found this when I tried to run #5765 on a RISC-V machine.

.clif Test Case

test run
target riscv64gc

function %b() {
block0:
    return
}

function %a(i16) -> i16 {
    sig0 = () system_v
    fn0 = colocated %b sig0

block0(v0: i16):
    call fn0()
    return v0
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
thread 'worker #1' panicked at 'not implemented', cranelift/jit/src/compiled_blob.rs:105:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: not implemented
FAIL ./lmao.clif: panicked in worker #1: not implemented
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: riscv64

Extra Info

The testcase passes if we drop the colocated flag.

Looks like we are missing handling for the RISC-V Call relocation in the JIT.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2023 at 18:27):

afonso360 labeled issue #5832:

:wave: Hey,

Fuzzgen found this when I tried to run #5765 on a RISC-V machine.

.clif Test Case

test run
target riscv64gc

function %b() {
block0:
    return
}

function %a(i16) -> i16 {
    sig0 = () system_v
    fn0 = colocated %b sig0

block0(v0: i16):
    call fn0()
    return v0
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
thread 'worker #1' panicked at 'not implemented', cranelift/jit/src/compiled_blob.rs:105:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: not implemented
FAIL ./lmao.clif: panicked in worker #1: not implemented
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: riscv64

Extra Info

The testcase passes if we drop the colocated flag.

Looks like we are missing handling for the RISC-V Call relocation in the JIT.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2023 at 18:27):

afonso360 labeled issue #5832:

:wave: Hey,

Fuzzgen found this when I tried to run #5765 on a RISC-V machine.

.clif Test Case

test run
target riscv64gc

function %b() {
block0:
    return
}

function %a(i16) -> i16 {
    sig0 = () system_v
    fn0 = colocated %b sig0

block0(v0: i16):
    call fn0()
    return v0
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
thread 'worker #1' panicked at 'not implemented', cranelift/jit/src/compiled_blob.rs:105:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: not implemented
FAIL ./lmao.clif: panicked in worker #1: not implemented
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: riscv64

Extra Info

The testcase passes if we drop the colocated flag.

Looks like we are missing handling for the RISC-V Call relocation in the JIT.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 18 2023 at 18:32):

bjorn3 commented on issue #5832:

Looks like we are missing handling for the RISC-V Call relocation in the JIT.

Indeed: https://github.com/bytecodealliance/wasmtime/blob/1e6c94bec1a56a88ea3df518de0d073d26596580/cranelift/jit/src/compiled_blob.rs#L105

view this post on Zulip Wasmtime GitHub notifications bot (Feb 28 2023 at 12:23):

afonso360 closed issue #5832:

:wave: Hey,

Fuzzgen found this when I tried to run #5765 on a RISC-V machine.

.clif Test Case

test run
target riscv64gc

function %b() {
block0:
    return
}

function %a(i16) -> i16 {
    sig0 = () system_v
    fn0 = colocated %b sig0

block0(v0: i16):
    call fn0()
    return v0
}

; run: %a(1) == 1

Steps to Reproduce

Expected Results

The test to pass

Actual Results

     Running `qemu-riscv64 -L /usr/riscv64-linux-gnu -E LD_LIBRARY_PATH=/usr/riscv64-linux-gnu/lib /home/afonso/git/wasmtime/target/riscv64gc-unknown-linux-gnu/debug/clif-util test ./lmao.clif`
thread 'worker #1' panicked at 'not implemented', cranelift/jit/src/compiled_blob.rs:105:22
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #1: not implemented
FAIL ./lmao.clif: panicked in worker #1: not implemented
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: riscv64

Extra Info

The testcase passes if we drop the colocated flag.

Looks like we are missing handling for the RISC-V Call relocation in the JIT.


Last updated: Dec 23 2024 at 12:05 UTC