Skip to content

Panic compiling a memory operation with fuel and nonstandard configuration #5445

@alexcrichton

Description

@alexcrichton

This input module:

(module
  (func
    (local i32 i64)
    local.get 0
    i64.load8_s offset=2147483631
    local.set 1
  )
  (memory  1 1)
)

will fail to compile with:

$ cargo run compile testcase0.wat --fuel 0 --static-memory-maximum-size 538976288 
...
thread '<unnamed>' panicked at 'assertion failed: `(left == right)`
  left: `2`,
 right: `0`', crates/cranelift/src/func_environ.rs:388:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

cc @fitzgen as bisection shows that this was a regression from #5386

Metadata

Metadata

Assignees

No one assigned

    Labels

    fuzz-bugBugs found by a fuzzer

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions