validate

package
v3.8.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 14, 2020 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package validate provides functions for validating WebAssembly modules

Index

Constants

This section is empty.

Variables

View Source
var ErrStackUnderflow = errors.New("validate: stack underflow")

ErrStackUnderflow define the error message

Functions

func VerifyModule

func VerifyModule(module *wasm.Module) error

VerifyModule verifies the given module according to WebAssembly verification specs.

Types

type Error

type Error struct {
	Offset   int // Byte offset in the bytecode vector where the error occurs.
	Function int // Index into the function index space for the offending function.
	Err      error
}

Error define the error struct

func (Error) Error

func (e Error) Error() string

Error define the error func

type InvalidElementIndexError

type InvalidElementIndexError uint32

InvalidElementIndexError define invalid element index error

func (InvalidElementIndexError) Error

func (e InvalidElementIndexError) Error() string

Error

type InvalidImmediateError

type InvalidImmediateError struct {
	ImmType string
	OpName  string
}

InvalidImmediateError define invalid immediate error

func (InvalidImmediateError) Error

func (e InvalidImmediateError) Error() string

Error define invalid immediate error message

type InvalidLabelError

type InvalidLabelError uint32

InvalidLabelError define uint32 type

func (InvalidLabelError) Error

func (e InvalidLabelError) Error() string

Error define invalid label error

type InvalidLocalIndexError

type InvalidLocalIndexError uint32

InvalidLocalIndexError define uint32 type

func (InvalidLocalIndexError) Error

func (e InvalidLocalIndexError) Error() string

Error define invalid local index error

type InvalidTypeError

type InvalidTypeError struct {
	Wanted wasm.ValueType
	Got    wasm.ValueType
}

InvalidTypeError define invalid type error struct

func (InvalidTypeError) Error

func (e InvalidTypeError) Error() string

Error define invalid type error

type NoSectionError

type NoSectionError wasm.SectionID

NoSectionError define section id

func (NoSectionError) Error

func (e NoSectionError) Error() string

Error define no section error

type UnmatchedOpError

type UnmatchedOpError byte

UnmatchedOpError define byte type

func (UnmatchedOpError) Error

func (e UnmatchedOpError) Error() string

Error define unmathed operator error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL