Documentation

Miri.Interpreter.VirtualCalls

Stateful virtual receiver/vtable dispatch, dynamic drop and caller-location selection from pinned interpret/call.rs and eval_context.rs. Complete compiler instances, argument rebasing, type constructors and inline-scope span queries remain required compiler leaves; no ABI or function identity is guessed.

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

        SourceScopeData fields consumed by Body::caller_location_span.

        Instances For
          Instances For
            Instances For

              place.rs imm_ptr_to_mplace: type/deref/layout queries precede scalar extraction; this caches misalignment without checking pointer dereferenceability or dynamic size. An unaligned raw receiver can still resolve a virtual method.

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

                Actual canonical memory reads and existing operand field projection. Compiler/global-vtable/host-alignment leaves remain explicit dictionaries.

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

                  Source TyAndLayout::non_1zst_field exits immediately on a second non-1-ZST field; no later field query is executed. It does not project/read field values.

                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Miri.Interpreter.VirtualCalls.receiverPlace {P S C E : Type} (h : Hooks P S C E) (choice : C) :
                    Nat → OpTy P → CallM S (MPlaceTy P)

                    Receiver unwrapping performs ordinary typed immediate reads but never a reference dereference/validity check: raw dyn receivers need not be accessible. The budget is a concrete runner recursion limit, not source semantics.

                    Equations
                    Instances For
                      def Miri.Interpreter.VirtualCalls.assertConcrete {S C : Type} (compiler : CompilerHooks S C) (choice : C) (dynTy : MIR.TyId) (definition : MIR.DefId) (virtualInstance concreteInstance : CallInstance) :

                      Exact full-instance consistency assertion after symbolic Method selection. Compiler rebasing preserves all method-level generic arguments and shim kind.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        def Miri.Interpreter.VirtualCalls.resolveVirtual {P S C E : Type} [Memory.PointerProvenance P] (h : Hooks P S C E) (choice : C) (budget : Nat) (virtualInstance : CallInstance) (definition : MIR.DefId) (slot : Nat) (callerAbi : ABI.FnAbi MIR.TyId) (args : Array (FnArg P)) :

                        Source Virtual arm: unwrap receiver, inspect dyn tail, check symbolic vtable, select Method, assert full instance, build thin raw receiver, then patch only the first caller-ABI argument's type. The real callee ABI check occurs in the normal recursive Call pipeline, not eagerly at vtable selection.

                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          def Miri.Interpreter.VirtualCalls.callerLocationSpan {S C : Type} (compiler : CompilerHooks S C) (bodyIdentity : BodyIdentity) (fnInstance : CallInstance) (body : MIR.Body) (trackedCaller : Option MIR.SpanRef) :

                          rustc_middle Body::caller_location_span walks only inlined-parent scopes, stopping inside the first non-track_caller callee; the incoming argument is a fallback only after the whole inlined chain has been considered.

                          Equations
                          • One or more equations did not get rendered due to their size.
                          Instances For
                            def Miri.Interpreter.VirtualCalls.callerLocation {P S C E : Type} (h : Hooks P S C E) (budget : Nat) :

                            eval_context.rs caller_location: Call's fn_span replaces only SourceInfo's span; inline-scope-aware compiler handling still receives trackCallerArg.

                            Equations
                            • One or more equations did not get rendered due to their size.
                            Instances For
                              def Miri.Interpreter.VirtualCalls.unpackDynForDrop {P S C E : Type} [Memory.PointerProvenance P] (h : Hooks P S C E) (choice : C) (place : MPlaceTy P) :

                              Concrete dyn drop unpacks the symbolic vtable's type/layout with a wrapping zero offset and clears metadata, retaining the canonical pointer/misalignment.

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

                                call.rs constructs an erased-region mutable reference, then mplace_to_imm_ptr converts the place before builtin-deref/layout assertions.

                                Equations
                                • One or more equations did not get rendered due to their size.
                                Instances For
                                  def Miri.Interpreter.VirtualCalls.bind {P S C E Other Extern : Type} [Memory.PointerProvenance P] (h : Hooks P S C E) (budget : Nat) (base : CallHooks P S C E Other Extern (ABI.FnAbi MIR.TyId) (ABI.ArgAbi MIR.TyId)) :

                                  Install actual runtime dispatch and location selection while preserving mandatory normal-call/ABI/body/machine leaves in the base Call dictionary.

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