Enum wasmtime_environ::TrapCode
source · #[repr(u8)]pub enum TrapCode {
StackOverflow,
HeapOutOfBounds,
HeapMisaligned,
TableOutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
UnreachableCodeReached,
Interrupt,
AlwaysTrapAdapter,
}
Expand description
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.
HeapOutOfBounds
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 wasm atomic operation was presented with a not-naturally-aligned linear-memory address.
TableOutOfBounds
A table_addr
instruction detected an out-of-bounds 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.
AlwaysTrapAdapter
Used for the component model when functions are lifted/lowered in a way that generates a function that always traps.
Trait Implementations§
source§impl PartialEq<TrapCode> for TrapCode
impl PartialEq<TrapCode> for TrapCode
impl Copy for TrapCode
impl Eq for TrapCode
impl StructuralEq for TrapCode
impl StructuralPartialEq for TrapCode
Auto Trait Implementations§
impl RefUnwindSafe for TrapCode
impl Send for TrapCode
impl Sync for TrapCode
impl Unpin for TrapCode
impl UnwindSafe for TrapCode
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CallHasher for Twhere
T: Hash + ?Sized,
impl<T> CallHasher for Twhere T: Hash + ?Sized,
source§impl<Q, K> Equivalent<K> for Qwhere
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Qwhere Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.