The allocation-bounds and pointer-alignment helpers from the pinned
rustc_const_eval/src/interpret/memory.rs. Pointer-to-allocation resolution,
live-allocation lookup, and machine policy are explicit inputs: this module
does not infer liveness or dereference validity from an allocation ID alone.
- memoryAccess : CheckInAllocMsg
- inboundsPointerArithmetic : CheckInAllocMsg
- dereferenceable (description : String) : CheckInAllocMsg
- other (description : String) : CheckInAllocMsg
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq Miri.Memory.CheckInAllocMsg.memoryAccess Miri.Memory.CheckInAllocMsg.memoryAccess = isTrue ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq Miri.Memory.CheckInAllocMsg.memoryAccess (Miri.Memory.CheckInAllocMsg.dereferenceable description) = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq Miri.Memory.CheckInAllocMsg.memoryAccess (Miri.Memory.CheckInAllocMsg.other description) = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic = isTrue ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic (Miri.Memory.CheckInAllocMsg.dereferenceable description) = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic (Miri.Memory.CheckInAllocMsg.other description) = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.dereferenceable description) Miri.Memory.CheckInAllocMsg.memoryAccess = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.dereferenceable description) Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.dereferenceable a) (Miri.Memory.CheckInAllocMsg.dereferenceable b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.dereferenceable description) (Miri.Memory.CheckInAllocMsg.other description_1) = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.other description) Miri.Memory.CheckInAllocMsg.memoryAccess = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.other description) Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.other description) (Miri.Memory.CheckInAllocMsg.dereferenceable description_1) = isFalse ⋯
- Miri.Memory.instDecidableEqCheckInAllocMsg.decEq (Miri.Memory.CheckInAllocMsg.other a) (Miri.Memory.CheckInAllocMsg.other b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- Miri.Memory.CheckInAllocMsg.memoryAccess.asString = "memory access"
- Miri.Memory.CheckInAllocMsg.inboundsPointerArithmetic.asString = "inbounds pointer arithmetic"
- (Miri.Memory.CheckInAllocMsg.dereferenceable a).asString = toString "dereferenceable " ++ toString a
- (Miri.Memory.CheckInAllocMsg.other a).asString = a
Instances For
- liveData : AllocationKind
- function : AllocationKind
- vaList : AllocationKind
- vtable : AllocationKind
- typeId : AllocationKind
- dead : AllocationKind
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- size : ABI.Size
- align : ABI.Align
- kind : AllocationKind
- mutability : Mutability
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- deadAllocation (id : AllocId) : AllocationLookupError
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Memory.instDecidableEqAllocationLookupError.decEq (Miri.Memory.AllocationLookupError.deadAllocation id) (Miri.Memory.AllocationLookupError.unavailable id_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAllocationLookupError.decEq (Miri.Memory.AllocationLookupError.unavailable id) (Miri.Memory.AllocationLookupError.deadAllocation id_1) = isFalse ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
- sizeDoesNotFitI64 (size : ABI.Size) : AccessError
- signedSizeOutsideI64 (size : Int) : AccessError
- danglingIntegerPointer (address : UInt64) (size : Int) (message : CheckInAllocMsg) : AccessError
- allocationLookup (reason : AllocationLookupError) : AccessError
- pointerArithmetic (reason : PointerError) : AccessError
- pointerOutOfBounds (id : AllocId) (allocationSize : ABI.Size) (offset inboundsSize : Int) (message : CheckInAllocMsg) : AccessError
- malformedAlignment (reason : ABI.AlignError) : AccessError
- alignmentCheckFailed (misalignment : Misalignment) : AccessError
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 a) (Miri.Memory.AccessError.sizeDoesNotFitI64 b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 size) (Miri.Memory.AccessError.signedSizeOutsideI64 size_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 size) (Miri.Memory.AccessError.danglingIntegerPointer address size_1 message) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 size) (Miri.Memory.AccessError.allocationLookup reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 size) (Miri.Memory.AccessError.pointerArithmetic reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 size) (Miri.Memory.AccessError.malformedAlignment reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.sizeDoesNotFitI64 size) (Miri.Memory.AccessError.alignmentCheckFailed misalignment) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 size) (Miri.Memory.AccessError.sizeDoesNotFitI64 size_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 a) (Miri.Memory.AccessError.signedSizeOutsideI64 b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 size) (Miri.Memory.AccessError.danglingIntegerPointer address size_1 message) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 size) (Miri.Memory.AccessError.allocationLookup reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 size) (Miri.Memory.AccessError.pointerArithmetic reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 size) (Miri.Memory.AccessError.malformedAlignment reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.signedSizeOutsideI64 size) (Miri.Memory.AccessError.alignmentCheckFailed misalignment) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.danglingIntegerPointer address size message) (Miri.Memory.AccessError.sizeDoesNotFitI64 size_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.danglingIntegerPointer address size message) (Miri.Memory.AccessError.signedSizeOutsideI64 size_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.danglingIntegerPointer address size message) (Miri.Memory.AccessError.allocationLookup reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.danglingIntegerPointer address size message) (Miri.Memory.AccessError.pointerArithmetic reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.danglingIntegerPointer address size message) (Miri.Memory.AccessError.malformedAlignment reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.danglingIntegerPointer address size message) (Miri.Memory.AccessError.alignmentCheckFailed misalignment) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup reason) (Miri.Memory.AccessError.sizeDoesNotFitI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup reason) (Miri.Memory.AccessError.signedSizeOutsideI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup reason) (Miri.Memory.AccessError.danglingIntegerPointer address size message) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup a) (Miri.Memory.AccessError.allocationLookup b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup reason) (Miri.Memory.AccessError.pointerArithmetic reason_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup reason) (Miri.Memory.AccessError.malformedAlignment reason_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.allocationLookup reason) (Miri.Memory.AccessError.alignmentCheckFailed misalignment) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic reason) (Miri.Memory.AccessError.sizeDoesNotFitI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic reason) (Miri.Memory.AccessError.signedSizeOutsideI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic reason) (Miri.Memory.AccessError.danglingIntegerPointer address size message) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic reason) (Miri.Memory.AccessError.allocationLookup reason_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic a) (Miri.Memory.AccessError.pointerArithmetic b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic reason) (Miri.Memory.AccessError.malformedAlignment reason_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.pointerArithmetic reason) (Miri.Memory.AccessError.alignmentCheckFailed misalignment) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment reason) (Miri.Memory.AccessError.sizeDoesNotFitI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment reason) (Miri.Memory.AccessError.signedSizeOutsideI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment reason) (Miri.Memory.AccessError.danglingIntegerPointer address size message) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment reason) (Miri.Memory.AccessError.allocationLookup reason_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment reason) (Miri.Memory.AccessError.pointerArithmetic reason_1) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment a) (Miri.Memory.AccessError.malformedAlignment b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.malformedAlignment reason) (Miri.Memory.AccessError.alignmentCheckFailed misalignment) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed misalignment) (Miri.Memory.AccessError.sizeDoesNotFitI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed misalignment) (Miri.Memory.AccessError.signedSizeOutsideI64 size) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed misalignment) (Miri.Memory.AccessError.danglingIntegerPointer address size message) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed misalignment) (Miri.Memory.AccessError.allocationLookup reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed misalignment) (Miri.Memory.AccessError.pointerArithmetic reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed misalignment) (Miri.Memory.AccessError.malformedAlignment reason) = isFalse ⋯
- Miri.Memory.instDecidableEqAccessError.decEq (Miri.Memory.AccessError.alignmentCheckFailed a) (Miri.Memory.AccessError.alignmentCheckFailed b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
- pointer : ResolvedPointer ProvExtra
- allocation : AllocationInfo
Instances For
Equations
- Miri.Memory.PointerResolver Prov ProvExtra = (Miri.Memory.Pointer (Option Prov) → Int → Except UInt64 (Miri.Memory.ResolvedPointer ProvExtra))
Instances For
Equations
Instances For
Equations
- Miri.Memory.sizeAsI64 size = if size.bytes.toNat < 9223372036854775808 then Except.ok (Int.ofNat size.bytes.toNat) else Except.error (Miri.Memory.AccessError.sizeDoesNotFitI64 size)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact common check_and_deref_ptr order. Zero-sized accesses return
none without pointer resolution or allocation lookup. Nonzero accesses first
resolve provenance/address, then obtain live allocation metadata, then perform
the checked signed interval test. The callbacks are the unported Machine and
memory-map dependencies of the source method.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source get_ptr_access: converting Size to host i64 is checked, then
the common dereference/bounds helper supplies the live allocation details.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source check_ptr_access, retaining its configurable access diagnostic.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source check_ptr_access_signed; a negative amount checks bytes to the
left of the pointer, and zero retains the source's no-dereference behavior.
Equations
- Miri.Memory.checkPtrAccessSigned target ptr size message resolve lookup = do let _ ← Miri.Memory.checkAndDerefPtr target ptr size.toInt message resolve lookup pure ()
Instances For
Source is_ptr_misaligned, factored over explicit resolver, allocation
metadata, enforcement policy, and machine-specific alignment hook. For
address-based provenance, the pointer offset is its absolute address; for
relative provenance, both allocation alignment and relative offset are checked.
The hook must be supplied by the selected Machine, including its default None
behavior when no machine-specific rule applies.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Source check_ptr_align error boundary. The source message is always
CheckAlignMsg::AccessedPtr for this API.
Equations
- One or more equations did not get rendered due to their size.