Documentation

Miri.Interpreter.ValidityMemory

Concrete validity byte/provenance/padding operations. Allocation access is explicitly ghost, as validate_place_internal requires; retagging remains a separate actual machine effect in ValidityVisitor. All memory, hook-state and touched-extra effects are committed before propagating failures.

structure Miri.Interpreter.ValidityMemory.Environment (P Extra Kind H ProvExtra S : Type) :
Instances For
    def Miri.Interpreter.ValidityMemory.readImmediate {K P E H X S : Type} [DecidableEq K] [DecidableEq P] [Memory.PointerProvenance P] (env : Environment P E K H X S) (operand : OpTy P) (expected : Memory.ExpectedValue) :

    Actual primitive scalar/scalar-pair decoding, retaining full type identity. Known initialization/provenance failures are mapped to validity categories.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      def Miri.Interpreter.ValidityMemory.readBytes {K P E H X S : Type} [DecidableEq K] [Memory.PointerProvenance P] (env : Environment P E K H X S) (place : MPlaceTy P) (size : ABI.Size) (expected : Memory.ExpectedValue) :

      Numeric arrays and str validate initialized bytes while stripping pointer provenance according to the actual provenance representation. No extra alignment check is introduced: source uses get_ptr_alloc, not place access.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For

        A padding handle names the one mutable allocation reference obtained by reset_padding. Later gap writes re-read its current allocation, preserving all earlier gap writes and partial mutations on error.

        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
              def Miri.Interpreter.ValidityMemory.beginPadding {K P E H X S : Type} [DecidableEq K] (env : Environment P E K H X S) (place : MPlaceTy P) (size : ABI.Size) :
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Miri.Interpreter.ValidityMemory.beginPadding_zero {K P E H X S : Type} [DecidableEq K] (env : Environment P E K H X S) (place : MPlaceTy P) (state : S) (identity : env.putTouched (env.putMemoryHooks state (env.memory state) (env.hooks state)) none = state) :

                A zero-sized padding region obtains no allocation reference. The lens identity states that committing the unchanged view has no effect.

                def Miri.Interpreter.ValidityMemory.writePadding {K P E H X S : Type} [DecidableEq K] (env : Environment P E K H X S) (handle : PaddingHandle) (relative : Memory.AllocRange) :
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  def Miri.Interpreter.ValidityMemory.clearBytesProvenance {K P E H X S : Type} [DecidableEq K] (env : Environment P E K H X S) (place : MPlaceTy P) (size : ABI.Size) :
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Miri.Interpreter.ValidityMemory.clearPlaceProvenance {K P E H X S C Extra : Type} [DecidableEq K] [Memory.PointerProvenance P] (env : Environment P E K H X S) (placeHooks : PlaceHooks P S C Extra) (choice : C) (validationInProgress : M S Bool) (afterLocalWrite : MIR.LocalId → Bool → M S Unit) (place : RuntimePlace P) :

                    Source place.rs clear_provenance, including the no-provenance immediate fast path and partial ScalarPair conversion. Under validation the local write hook is suppressed; outside that scope its actual callback remains required.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Miri.Interpreter.ValidityMemory.writeNoValidate {K P E H X S C Extra : Type} [DecidableEq K] [DecidableEq P] [Memory.PointerProvenance P] (env : Environment P E K H X S) (placeHooks : PlaceHooks P S C Extra) (choice : C) (willValidate : MemoryOperandLayout → Bool) (value : Immediate P) (place : RuntimePlace P) :

                      Typed writes performed by provenance resetting explicitly use ghost allocation access; optimized-local handling remains source's mutable-local selection and scoped local-write policy.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def Miri.Interpreter.ValidityMemory.bind {K P S C Extra F A E H X : Type} [DecidableEq K] [DecidableEq P] [Memory.PointerProvenance P] (base : ValidityVisitor.Hooks P S C Extra F A PaddingHandle) (env : Environment P E K H X S) (validationInProgress : M S Bool) (afterLocalWrite : MIR.LocalId → Bool → M S Unit) (willValidate : MemoryOperandLayout → Bool) :

                        Install the concrete allocation operations without replacing compiler, reference, vtable or machine-retag queries with successful stubs.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For