[][src]Enum wasmer_vm::TrapCode

#[repr(u32)]pub enum TrapCode {
    StackOverflow,
    HeapSetterOutOfBounds,
    HeapAccessOutOfBounds,
    HeapMisaligned,
    TableSetterOutOfBounds,
    TableAccessOutOfBounds,
    OutOfBounds,
    IndirectCallToNull,
    BadSignature,
    IntegerOverflow,
    IntegerDivisionByZero,
    BadConversionToInteger,
    UnreachableCodeReached,
    Interrupt,
    UnalignedAtomic,
    VMOutOfMemory,
}

A trap code describing the reason for a trap.

All trap instructions have an explicit trap code.

Variants

StackOverflow

The current stack space was exhausted.

On some platforms, a stack overflow may also be indicated by a segmentation fault from the stack guard page.

HeapSetterOutOfBounds

Memory data doesn't fit the memory size.

This only can happen during instantiation.

HeapAccessOutOfBounds

A heap_addr instruction detected an out-of-bounds error.

Note that not all out-of-bounds heap accesses are reported this way; some are detected by a segmentation fault on the heap unmapped or offset-guard pages.

HeapMisaligned

A heap_addr instruction was misaligned.

TableSetterOutOfBounds

Table Elements doesn't fit the table size.

This only can happen during instantiation.

TableAccessOutOfBounds

A table_addr instruction detected an out-of-bounds error.

OutOfBounds

Other bounds checking error.

IndirectCallToNull

Indirect call to a null table entry.

BadSignature

Signature mismatch on indirect call.

IntegerOverflow

An integer arithmetic operation caused an overflow.

IntegerDivisionByZero

An integer division by zero.

BadConversionToInteger

Failed float-to-int conversion.

UnreachableCodeReached

Code that was supposed to have been unreachable was reached.

Interrupt

Execution has potentially run too long and may be interrupted. This trap is resumable.

UnalignedAtomic

An atomic memory access was attempted with an unaligned pointer.

VMOutOfMemory

A trap indicating that the runtime was unable to allocate sufficient memory.

Implementations

impl TrapCode[src]

pub fn message(&self) -> &str[src]

Gets the message for this trap code

Trait Implementations

impl Clone for TrapCode[src]

impl Copy for TrapCode[src]

impl Debug for TrapCode[src]

impl<'de> Deserialize<'de> for TrapCode[src]

impl Display for TrapCode[src]

impl Eq for TrapCode[src]

impl Error for TrapCode[src]

impl FromStr for TrapCode[src]

type Err = ()

The associated error which can be returned from parsing.

impl Hash for TrapCode[src]

impl PartialEq<TrapCode> for TrapCode[src]

impl Serialize for TrapCode[src]

impl StructuralEq for TrapCode[src]

impl StructuralPartialEq for TrapCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<Q, K> Equivalent<K> for Q where
    K: Borrow<Q> + ?Sized,
    Q: Eq + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.