Crate miri

source Β·

Re-exports§

Modules§

  • alloc_addresses πŸ”’
    This module is responsible for managing the absolute addresses that allocations are located at, and for casting between pointers and integers based on those addresses.
  • alloc_bytes πŸ”’
  • borrow_tracker πŸ”’
  • clock πŸ”’
  • concurrency πŸ”’
  • diagnostics πŸ”’
  • eval πŸ”’
    Main evaluator loop and setting up the initial stack frame.
  • helpers πŸ”’
  • intrinsics πŸ”’
  • machine πŸ”’
    Global machine state as well as implementation of the interpreter engine Machine trait.
  • mono_hash_map πŸ”’
    This is a β€œmonotonic FxHashMap”: A FxHashMap that, when shared, can be pushed to but not otherwise mutated. We also box items in the map. This means we can safely provide shared references into existing items in the FxHashMap, because they will not be dropped (from being removed) or moved (because they are boxed). The API is completely tailored to what memory.rs needs. It is still in a separate file to minimize the amount of code that has to care about the unsafety.
  • operator πŸ”’
  • provenance_gc πŸ”’
  • range_map πŸ”’
    Implements a map from integer indices to data. Rather than storing data for every index, internally, this maps entire ranges to the data. To this end, the APIs all work on ranges, not on individual integers. Ranges are split as necessary (e.g., when [0,5) is first associated with X, and then [1,2) is mutated). Users must not depend on whether a range is coalesced or not, even though this is observable via the iteration APIs.
  • shims πŸ”’

Macros§

Structs§

  • Extra per-allocation data
  • Tracking pointer provenance
  • Holds all of the relevant data for when unwinding hits a try frame.
  • A monotone clock used for Instant simulation.
  • 0 is used to indicate that the id was not yet assigned and, therefore, is not a valid identifier.
  • Type of dynamic symbols (for dlsym et al)
  • Extra data stored with each stack frame
  • 0 is used to indicate that the id was not yet assigned and, therefore, is not a valid identifier.
  • An item in the per-location borrow stack.
  • Allocation bytes that explicitly handle the layout of the data they’re storing. This is necessary to interface with native code that accesses the program store in Miri.
  • Configuration needed to spawn a Miri instance.
  • The machine itself.
  • 0 is used to indicate that the id was not yet assigned and, therefore, is not a valid identifier.
  • Precomputed layouts of primitive types
  • 0 is used to indicate that the id was not yet assigned and, therefore, is not a valid identifier.
  • Extra per-location state.
  • Extra per-allocation state.
  • The state of all synchronization objects.
  • A thread identifier.
  • A set of threads.
  • Tree structure with both parents and children since we want to be able to traverse the tree efficiently in both directions.

Enums§

Constants§

  • The maximum number of CPUs supported by miri.
  • Insert rustc arguments at the beginning of the argument list that Miri wants to be set per default, for maximal validation power. Also disable the MIR pass that inserts an alignment check on every pointer dereference. Miri does that too, and with a better error message.

Traits§

Functions§

  • Returns a freshly created InterpCx. Public because this is also used by priroda.
  • Evaluates the entry function specified by entry_id. Returns Some(return_code) if program executed completed. Returns None if an evaluation error occurred.
  • Emit a custom diagnostic without going through the miri-engine machinery.

Type Aliases§