validate

package
v0.0.0-...-67468a5 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2020 License: Apache-2.0, BSD-3-Clause Imports: 11 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")
View Source
var PrintDebugInfo = false

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
}

func (Error) Error

func (e Error) Error() string

type InvalidElementIndexError

type InvalidElementIndexError uint32

func (InvalidElementIndexError) Error

func (e InvalidElementIndexError) Error() string

type InvalidImmediateError

type InvalidImmediateError struct {
	ImmType string
	OpName  string
}

func (InvalidImmediateError) Error

func (e InvalidImmediateError) Error() string

type InvalidLabelError

type InvalidLabelError uint32

func (InvalidLabelError) Error

func (e InvalidLabelError) Error() string

type InvalidLocalIndexError

type InvalidLocalIndexError uint32

func (InvalidLocalIndexError) Error

func (e InvalidLocalIndexError) Error() string

type InvalidTypeError

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

func (InvalidTypeError) Error

func (e InvalidTypeError) Error() string

type NoSectionError

type NoSectionError wasm.SectionID

func (NoSectionError) Error

func (e NoSectionError) Error() string

type UnmatchedOpError

type UnmatchedOpError byte

func (UnmatchedOpError) Error

func (e UnmatchedOpError) Error() string

Jump to

Keyboard shortcuts

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