pub enum ExecutionError<Address>where
Address: Copy,{
Show 15 variants
UnalignedInstruction {
address: PackedAddress<Address>,
},
OutOfBoundsRead {
address: PackedAddress<u64>,
},
OutOfBoundsWrite {
address: PackedAddress<u64>,
},
MisalignedRead {
address: PackedAddress<u64>,
},
MisalignedWrite {
address: PackedAddress<u64>,
},
MisalignedAtomic {
address: PackedAddress<u64>,
},
EcallUnsupported {
address: PackedAddress<Address>,
},
IllegalInstruction {
address: PackedAddress<Address>,
},
CsrReadOnly {
csr_index: u16,
},
CsrIllegalRead {
csr_index: u16,
},
CsrIllegalWrite {
csr_index: u16,
},
CsrUnknown {
csr_index: u16,
},
CsrInsufficientPrivilege {
csr_index: u16,
required: PrivilegeLevel,
current: PrivilegeLevel,
},
UnsupportedPlatform,
Custom([u8; 8]),
}Expand description
Execution errors.
The variants of VirtualMemoryError and CsrError are inlined
here rather than nested. Nesting cost an extra discriminant per level, which made this type 24
bytes; flattened it is 16, which is what lets Result<_, ExecutionError> be returned in
registers instead of through a hidden out-pointer. From implementations for all three are
provided, so ? on them keeps working unchanged.
Variants§
UnalignedInstruction
Unaligned instruction
Fields
address: PackedAddress<Address>Address of the unaligned instruction fetch
OutOfBoundsRead
Out-of-bounds read
Fields
address: PackedAddress<u64>Address of the out-of-bounds read
OutOfBoundsWrite
Out-of-bounds write
Fields
address: PackedAddress<u64>Address of the out-of-bounds write
MisalignedRead
Misaligned read from an instruction that requires natural alignment (e.g. lr), unlike
ordinary loads
Fields
address: PackedAddress<u64>Address of the misaligned read
MisalignedWrite
Misaligned write from an instruction that requires natural alignment (e.g. sc), unlike
ordinary stores
Fields
address: PackedAddress<u64>Address of the misaligned write
MisalignedAtomic
Misaligned atomic access (e.g. AMO) whose accessed bytes are not all within the same misaligned atomicity granule, unlike an ordinary misaligned read or write
Fields
address: PackedAddress<u64>Address of the misaligned atomic access
EcallUnsupported
Unsupported ecall instruction
Fields
address: PackedAddress<Address>Address of the unsupported instruction
IllegalInstruction
Unimplemented/illegal instruction
Fields
address: PackedAddress<Address>Address of the unimp instruction
CsrReadOnly
Read only CSR
CsrIllegalRead
Illegal read access
CsrIllegalWrite
Illegal write access
CsrUnknown
Unknown CSR
CsrInsufficientPrivilege
Insufficient privilege level
Fields
required: PrivilegeLevelRequired privilege level
current: PrivilegeLevelCurrent privilege level
UnsupportedPlatform
Threaded execution is not supported on this platform.
See OpaqueThreadedExecutionResult::platform_supported() for what makes a platform
unsupported and why the answer is a run-time one.
Custom([u8; 8])
Custom error
Trait Implementations§
Source§impl<Address> Debug for ExecutionError<Address>
impl<Address> Debug for ExecutionError<Address>
Source§impl<Address> Display for ExecutionError<Address>
impl<Address> Display for ExecutionError<Address>
Source§impl<Address> Error for ExecutionError<Address>
impl<Address> Error for ExecutionError<Address>
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
use the Display impl or to_string()