Canonical typed runtime visitor from pinned validity.rs and visitor.rs. Traversal consumes actual RuntimePlace/TyAndLayout, not a pre-resolved value graph. Compiler facts and machine accesses remain required effectful leaves.
- boolean : TypeKind
- character : TypeKind
- integer : TypeKind
- float : TypeKind
- functionPointer : TypeKind
- never : TypeKind
- foreign : TypeKind
- functionDefinition : TypeKind
- rawPointer (pointee : MIR.TyId) (pointeeSized : Bool) : TypeKind
- reference (mutable : Bool) : TypeKind
- string : TypeKind
- sequence (element : MIR.TyId) : TypeKind
- dynamic (expectedTrait : Nat) : TypeKind
- box : TypeKind
- pattern (base : MIR.TyId) : TypeKind
- aggregate (maybeDangling unsafeCell isEnum : Bool) : TypeKind
- unsafeBinder : TypeKind
- invalid : TypeKind
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
- dynamic (expectedTrait : Nat) : MetadataTail
- sliceOrStr : MetadataTail
- foreign : MetadataTail
Instances For
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.ValidityVisitor.instDecidableEqMetadataTail.decEq Miri.Interpreter.ValidityVisitor.MetadataTail.sliceOrStr Miri.Interpreter.ValidityVisitor.MetadataTail.sliceOrStr = isTrue ⋯
- Miri.Interpreter.ValidityVisitor.instDecidableEqMetadataTail.decEq Miri.Interpreter.ValidityVisitor.MetadataTail.foreign Miri.Interpreter.ValidityVisitor.MetadataTail.foreign = isTrue ⋯
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- mplace : MemPlace P
- layout : LocalLayout
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
Equations
Instances For
Memory operations here run under withGhostValidation, including provenance writes. Retagging is the source exception: its actual machine reborrow effects must still execute. readBytes strips provenance and checks initialization; it must not validate UTF-8 (source str validity only checks bytes). beginPadding obtains mutable allocation access once, followed by writePadding per gap.
- target : Miri.ABI.RuntimeTargetDataLayout
- projection : PlaceProjectionHooks P S C E
- vtable : VTableHooks P S C Fn ABI
- discriminant : DiscriminantHooks P S C (RuntimePlace P)
- debugAssertions : Bool
- unitLayout : C → M S LocalLayout
- fieldPath : C → LocalLayout → Nat → MIR.TyId → M S Memory.PathElem
- variantPath : C → LocalLayout → Nat → M S Memory.PathElem
- projectBox : C → RuntimePlace P → M S (RuntimePlace P × RuntimePlace P)
- toOp : C → RuntimePlace P → M S (OpTy P)
- readImmediate : C → RuntimePlace P → Memory.ExpectedValue → M S (RvalueImmTy P)
- clearProvenance : C → RuntimePlace P → M S Unit
- writeNoValidate : C → Immediate P → RuntimePlace P → M S Unit
- sizeAndAlign : C → MPlaceTy P → M S (Option (Miri.ABI.Size × Miri.ABI.Align))
- ptrToPlace : C → RvalueImmTy P → M S (MPlaceTy P)
- metadataTail : C → MIR.TyId → M S MetadataTail
- checkPointerAccess : C → Memory.Pointer (Option P) → Miri.ABI.Size → M S (Except Memory.AccessError Unit)
- checkPointerAlign : C → Memory.Pointer (Option P) → Miri.ABI.Align → M S Unit
- checkPointerAlignResult : C → Memory.Pointer (Option P) → Miri.ABI.Align → M S (Except Memory.Misalignment Unit)
Typed result for validity's source-specific AlignmentCheckFailed mapping. Other consumers keep the ordinary machine alignment error behavior.
- scalarMayBeNull : C → Memory.Scalar P → M S Bool
- retagPointer : C → RvalueImmTy P → MIR.TyId → M S (Option (RvalueImmTy P))
- ctfePointerLookup : C → MPlaceTy P → Memory.Validity.CtfeMode → M S Memory.Validity.PointerAllocLookup
- inMutableMemory : C → RuntimePlace P → M S Bool
- readBytes : C → MPlaceTy P → Miri.ABI.Size → Memory.ExpectedValue → M S Unit
- clearBytesProvenance : C → MPlaceTy P → Miri.ABI.Size → M S Unit
- beginPadding : C → MPlaceTy P → Miri.ABI.Size → M S (Option Padding)
- writePadding : C → Padding → Memory.AllocRange → M S Unit
- cachedUnionRanges : C → LocalLayout → M S Memory.Validity.DataRangeSet → M S Memory.Validity.DataRangeSet
Instances For
validity.rs::check_safe_pointer gives retag failures two pieces of
source-specific treatment. A mutable reborrow of immutable memory is reported
as a validity failure at the current path, while an aliasing-model machine
stop carries the path as diagnostic context. This runner keeps the callback's
successor state in either case, including when it fails after changing the
borrow tree.
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.ValidityVisitor.classifyRetagError path kind error = error
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Keep the source check_ptr_align successor state when turning its one source-remapped failure into a validation UB. Other machine failures retain their original classification and successor state.
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.
- Miri.Interpreter.ValidityVisitor.classifyPointerAccessError path kind error = Miri.Interpreter.MemoryErrors.access error
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Miri.Interpreter.ValidityVisitor.retagSafePointer path kind retag c pointer ty = Miri.Interpreter.ValidityVisitor.mapRetagOutcome path kind (retag c pointer ty)
Instances For
Data-byte union layout walk. It traverses compiler layouts, never reads an active union field, and preserves the source scalar-array fast path.
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.ValidityVisitor.unionRanges h c 0 x✝² x✝¹ x✝ = throw (Miri.Interpreter.StepError.resourceExhaustion "union layout traversal fuel")
Instances For
Recursive ValueVisitor plus validity-specific primitive/array/union rules. Fuel exhaustion is visible resource failure; it never validates an unexplored subvalue. Fields follow in-memory order; enum tag precedes active variant.
Equations
- One or more equations did not get rendered due to their size.
- Miri.Interpreter.ValidityVisitor.visit h c 0 x✝¹ x✝ = throw (Miri.Interpreter.StepError.resourceExhaustion "validity traversal fuel")
Instances For
A fieldless inhabited aggregate has no value bytes or child accesses. The premises expose compiler queries at this state, rather than assuming a validation-operation outcome.
No padding allocation is needed for a local-only validation session.
Unit memory validation has no padding bytes. Its zero-size mutable-access query produces no handle, so reset performs no writes or allocation.
Runtime validation: root may retag/reset; tracked pointees are checked in LIFO order without reset, without further tracking, and under may_dangle.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Const validation exposes the updated worklist to its outer interning loop; CTFE restrictions are distinct from ordinary recursive runtime checks.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Internal zero-padding composition after the original local place has been proved to denote its existing backing.