Enum cranelift_codegen::ir::TrapCode [−][src]
pub enum TrapCode {
StackOverflow,
HeapOutOfBounds,
HeapMisaligned,
TableOutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
UnreachableCodeReached,
Interrupt,
User(u16),
}
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.
User(u16)
Tuple Fields
0: u16
A user-defined trap code.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for TrapCode
impl UnwindSafe for TrapCode
Blanket Implementations
Mutably borrows from an owned value. Read more
Compare self to key
and return true
if they are equal.