Skip to content

lightbeam panicked when either run or wasm2obj #2379

Closed
@qinxk-inter

Description

@qinxk-inter

- What are the steps to reproduce the issue?
t.wasm is wat2wasm from below text:

(module
  (func $add (param $lhs i32) (param $rhs i32) (result i32)
    get_local $lhs
    get_local $rhs
    i32.add)
  (export "add" (func $add))
)

./wasmtime run --lightbeam t.wasm 1 2
./wasmtime wasm2obj --lightbeam t.wasm t.obj
- What do you expect to happen? What does actually happen? Does it panic, and
if so, with which assertion?

Expect to be run without any issue. Got error with the output:

thread 'main' panicked at 'index out of bounds: the len is 0 but the index is 0', /PATH/wasmtime/crates/lightbeam/src/backend.rs:637:35
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

- Which Wasmtime version / commit hash / branch are you using?
main latest by now, commit 12e658a
- If relevant, can you include some extra information about your environment?
(Rust version, operating system, architecture...)
rustc 1.45.2, MacOS

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIncorrect behavior in the current implementation that needs fixinglightbeamIssues related to the Lightbeam compiler

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions