Skip to content

Missing Type Validation for select Instruction #2708

@Q1IQ

Description

@Q1IQ

wasm-interp fails to reject an invalid WebAssembly module involving the select instruction.

Test case

select.wasm.txt

Environment

  • OS: Ubuntu 20.04
  • CPU: amd64
  • wasm-interp version: 6ca912cf
  • Commands:
wabt/bin/wasm-interp --enable-all test.wasm --run-export=run

Actual behavior

wasm-interp incorrectly accepts this invalid module (exit code 0). The output is:

run() => i32:42

Expected behavior

The runtime should reject this module during validation because the module violates the specification.

Exception: CompileError: WebAssembly.Module doesn't parse at byte 11: select invalid result arity for, in function at index 0 (evaluating 'new WebAssembly.Module(wasm_code)')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions