Skip to content

Cranelift verifier errors on v128.store codegen with b8x16 input #3099

@alexcrichton

Description

@alexcrichton

Given this input:

(module
  (memory 0)
  (func (param v128 i32)
    local.get 1
    local.get 0
    local.get 0
    i8x16.eq
    v128.store)
)

wasmtime yields:

$ wasmtime bar.wat --enable-simd --enable-cranelift-debug-verifier
Error: failed to run main module `bar.wat`

Caused by:
    0: WebAssembly failed to compile
    1: Compilation error: function u0:0(i64 vmctx, i64, i8x16, i32) fast {
           gv0 = vmctx
           gv1 = load.i64 notrap aligned readonly gv0
           gv2 = load.i64 notrap aligned gv1
           gv3 = vmctx
           gv4 = load.i64 notrap aligned readonly gv3+36
           heap0 = static gv4, min 0, bound 0x0001_0000_0000, offset_guard 0x8000_0000, index_type i32
           stack_limit = gv2

                                       block0(v0: i64, v1: i64, v2: i8x16, v3: i32):
       @0024                               v4 = icmp eq v2, v2
       @0026                               v5 = heap_addr.i64 heap0, v3, 1
       @0026                               store little v4, v5
       ;~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
       ; error: inst2 (store.b8x16 little v4, v5): has an invalid controlling type b8x16

       @002a                               jump block1

                                       block1:
       @002a                               return
       }

       ; 1 verifier error detected (see above). Compilation aborted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    fuzz-bugBugs found by a fuzzerwasm-proposal:simdIssues related to the WebAssembly SIMD proposal

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions