Enum wasmer_types::TrapCode
source · #[repr(u32)]pub enum TrapCode {
StackOverflow,
HeapAccessOutOfBounds,
HeapMisaligned,
TableAccessOutOfBounds,
IndirectCallToNull,
BadSignature,
IntegerOverflow,
IntegerDivisionByZero,
BadConversionToInteger,
UnreachableCodeReached,
UnalignedAtomic,
}
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.
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.
TableAccessOutOfBounds
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.
UnalignedAtomic
An atomic memory access was attempted with an unaligned pointer.
Implementations§
Trait Implementations§
source§impl Archive for TrapCode
impl Archive for TrapCode
source§impl<__C: ?Sized> CheckBytes<__C> for TrapCode
impl<__C: ?Sized> CheckBytes<__C> for TrapCode
§type Error = EnumCheckError<u32>
type Error = EnumCheckError<u32>
source§unsafe fn check_bytes<'__bytecheck>(
value: *const Self,
context: &mut __C
) -> Result<&'__bytecheck Self, EnumCheckError<u32>>
unsafe fn check_bytes<'__bytecheck>( value: *const Self, context: &mut __C ) -> Result<&'__bytecheck Self, EnumCheckError<u32>>
source§impl Error for TrapCode
impl Error for TrapCode
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
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> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
source§impl<T> ArchiveUnsized for Twhere
T: Archive,
impl<T> ArchiveUnsized for Twhere T: Archive,
§type Archived = <T as Archive>::Archived
type Archived = <T as Archive>::Archived
Archive
, it may be unsized. Read more§type MetadataResolver = ()
type MetadataResolver = ()
source§unsafe fn resolve_metadata(
&self,
_: usize,
_: <T as ArchiveUnsized>::MetadataResolver,
_: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata
)
unsafe fn resolve_metadata( &self, _: usize, _: <T as ArchiveUnsized>::MetadataResolver, _: *mut <<T as ArchiveUnsized>::Archived as ArchivePointee>::ArchivedMetadata )
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<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?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.