Enum cranelift_codegen::ir::TrapCode
source · pub enum TrapCode {
StackOverflow,
HeapOutOfBounds,
TableOutOfBounds,
OutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
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.
On some platforms, a stack overflow may also be indicated by a segmentation fault from the stack guard page.
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 guard pages.
TableOutOfBounds
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.
Interrupt
Execution has potentially run too long and may be interrupted. This trap is resumable.
User(u16)
A user-defined trap code.