Skip to content

Cranelift: Interpreter panic when bitcasting SIMD values #5915

@afonso360

Description

@afonso360

👋 Hey,

.clif Test Case

test interpret

function %a(i16x8) -> i64x2 {
block0(v3: i16x8):
    v23 = bitcast.i64x2 little v3
    return v23
}

; run: %a(0x00000000000000000000000000000000) == 0x00000000000000000000000000000000

Steps to Reproduce

  • cd cranelift
  • cargo run -- test ./the-above.clif

Expected Results

The test to pass.

Actual Results

     Running `/home/afonso/git/wasmtime/target/debug/clif-util test ./lmao.clif`
thread 'worker #0' panicked at 'index out of bounds: the len is 16 but the index is 16', cranelift/interpreter/src/step.rs:1565:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
 ERROR cranelift_filetests::concurrent > FAIL: panicked in worker #0: index out of bounds: the len is 16 but the index is 16
FAIL ./lmao.clif: panicked in worker #0: index out of bounds: the len is 16 but the index is 16
1 tests
Error: 1 failure

Versions and Environment

Cranelift version or commit: main

Operating system: Linux

Architecture: Interpreter (x86_64 host)

Extra Info

If anyone needs help working on this let me know!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixingcraneliftIssues related to the Cranelift code generatorcranelift:E-easyIssues suitable for newcomers to investigate, including Rust newcomers!good first issueIssues that are good for new contributors to tackle!

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions