Struct miri::machine::MiriMachine
source · pub struct MiriMachine<'mir, 'tcx> {Show 39 fields
pub tcx: TyCtxt<'tcx>,
pub borrow_tracker: Option<RefCell<GlobalStateInner>>,
pub data_race: Option<GlobalState>,
pub intptrcast: RefCell<GlobalStateInner>,
pub(crate) env_vars: EnvVars<'tcx>,
pub(crate) main_fn_ret_place: Option<MemPlace<Provenance>>,
pub(crate) argc: Option<MemPlace<Provenance>>,
pub(crate) argv: Option<MemPlace<Provenance>>,
pub(crate) cmd_line: Option<MemPlace<Provenance>>,
pub(crate) tls: TlsData<'tcx>,
pub(crate) isolated_op: IsolatedOp,
pub(crate) validate: bool,
pub(crate) enforce_abi: bool,
pub(crate) file_handler: FileHandler,
pub(crate) dir_handler: DirHandler,
pub(crate) clock: Clock,
pub(crate) threads: ThreadManager<'mir, 'tcx>,
pub(crate) layouts: PrimitiveLayouts<'tcx>,
pub(crate) static_roots: Vec<AllocId>,
profiler: Option<Profiler>,
string_cache: FxHashMap<String, StringId>,
pub(crate) exported_symbols_cache: FxHashMap<Symbol, Option<Instance<'tcx>>>,
pub(crate) panic_on_unsupported: bool,
pub(crate) backtrace_style: BacktraceStyle,
pub(crate) local_crates: Vec<CrateNum>,
extern_statics: FxHashMap<Symbol, Pointer<Provenance>>,
pub(crate) rng: RefCell<StdRng>,
tracked_alloc_ids: FxHashSet<AllocId>,
pub(crate) check_alignment: AlignmentCheck,
pub(crate) cmpxchg_weak_failure_rate: f64,
pub(crate) mute_stdout_stderr: bool,
pub(crate) weak_memory: bool,
pub(crate) preemption_rate: f64,
pub(crate) report_progress: Option<u32>,
pub(crate) basic_block_count: u64,
pub external_so_lib: Option<(Library, PathBuf)>,
pub(crate) gc_interval: u32,
pub(crate) since_gc: u32,
pub(crate) num_cpus: u32,
}
Expand description
The machine itself.
If you add anything here that stores machine values, remember to update
visit_all_machine_values
!
Fields§
§tcx: TyCtxt<'tcx>
§borrow_tracker: Option<RefCell<GlobalStateInner>>
Global data for borrow tracking.
data_race: Option<GlobalState>
Data race detector global data.
intptrcast: RefCell<GlobalStateInner>
Ptr-int-cast module global data.
env_vars: EnvVars<'tcx>
Environment variables set by setenv
.
Miri does not expose env vars from the host to the emulated program.
main_fn_ret_place: Option<MemPlace<Provenance>>
Return place of the main function.
argc: Option<MemPlace<Provenance>>
Program arguments (Option
because we can only initialize them after creating the ecx).
These are pointers to argc/argv because macOS.
We also need the full command line as one string because of Windows.
argv: Option<MemPlace<Provenance>>
§cmd_line: Option<MemPlace<Provenance>>
§tls: TlsData<'tcx>
TLS state.
isolated_op: IsolatedOp
What should Miri do when an op requires communicating with the host, such as accessing host env vars, random number generation, and file system access.
validate: bool
Whether to enforce the validity invariant.
enforce_abi: bool
Whether to enforce ABI of function calls.
file_handler: FileHandler
The table of file descriptors.
dir_handler: DirHandler
The table of directory descriptors.
clock: Clock
This machine’s monotone clock.
threads: ThreadManager<'mir, 'tcx>
The set of threads.
layouts: PrimitiveLayouts<'tcx>
Precomputed TyLayout
s for primitive data types that are commonly used inside Miri.
static_roots: Vec<AllocId>
Allocations that are considered roots of static memory (that may leak).
profiler: Option<Profiler>
The measureme
profiler used to record timing information about
the emulated program.
string_cache: FxHashMap<String, StringId>
Used with profiler
to cache the StringId
s for event names
uesd with measureme
.
exported_symbols_cache: FxHashMap<Symbol, Option<Instance<'tcx>>>
Cache of Instance
exported under the given Symbol
name.
None
means no Instance
exported under the given name is found.
panic_on_unsupported: bool
Whether to raise a panic in the context of the evaluated process when unsupported
functionality is encountered. If false
, an error is propagated in the Miri application context
instead (default behavior)
backtrace_style: BacktraceStyle
Equivalent setting as RUST_BACKTRACE on encountering an error.
local_crates: Vec<CrateNum>
Crates which are considered local for the purposes of error reporting.
extern_statics: FxHashMap<Symbol, Pointer<Provenance>>
Mapping extern static names to their base pointer.
rng: RefCell<StdRng>
The random number generator used for resolving non-determinism. Needs to be queried by ptr_to_int, hence needs interior mutability.
tracked_alloc_ids: FxHashSet<AllocId>
The allocation IDs to report when they are being allocated (helps for debugging memory leaks and use after free bugs).
check_alignment: AlignmentCheck
Controls whether alignment of memory accesses is being checked.
cmpxchg_weak_failure_rate: f64
Failure rate of compare_exchange_weak, between 0.0 and 1.0
mute_stdout_stderr: bool
Corresponds to -Zmiri-mute-stdout-stderr and doesn’t write the output but acts as if it succeeded.
weak_memory: bool
Whether weak memory emulation is enabled
preemption_rate: f64
The probability of the active thread being preempted at the end of each basic block.
report_progress: Option<u32>
If Some
, we will report the current stack every N basic blocks.
basic_block_count: u64
§external_so_lib: Option<(Library, PathBuf)>
Handle of the optional shared object file for external functions.
gc_interval: u32
Run a garbage collector for BorTags every N basic blocks.
since_gc: u32
The number of blocks that passed since the last BorTag GC pass.
num_cpus: u32
The number of CPUs to be reported by miri.
Implementations§
source§impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>
pub fn emit_diagnostic(&self, e: NonHaltingDiagnostic)
source§impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>
sourcepub fn current_span(&self) -> Span
pub fn current_span(&self) -> Span
Get the current span in the topmost function which is workspace-local and not
#[track_caller]
.
This function is backed by a cache, and can be assumed to be very fast.
It will work even when the stack is empty.
sourcepub fn caller_span(&self) -> Span
pub fn caller_span(&self) -> Span
Returns the span of the caller of the current operation, again walking down the stack to find the closest frame in a local crate, if the caller of the current operation is not in a local crate. This is useful when we are processing something which occurs on function-entry and we want to point at the call to the function, not the function definition generally.
fn stack(&self) -> &[Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>]
fn top_user_relevant_frame(&self) -> Option<usize>
sourcepub fn is_user_relevant(&self, frame: &Frame<'mir, 'tcx, Provenance>) -> bool
pub fn is_user_relevant(&self, frame: &Frame<'mir, 'tcx, Provenance>) -> bool
This is the source of truth for the is_user_relevant
flag in our FrameExtra
.
source§impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> MiriMachine<'mir, 'tcx>
pub(crate) fn new(
config: &MiriConfig,
layout_cx: LayoutCx<'tcx, TyCtxt<'tcx>>
) -> Self
pub(crate) fn late_init(
this: &mut MiriInterpCx<'mir, 'tcx>,
config: &MiriConfig,
on_main_stack_empty: StackEmptyCallback<'mir, 'tcx>
) -> InterpResult<'tcx>
fn add_extern_static(
this: &mut MiriInterpCx<'mir, 'tcx>,
name: &str,
ptr: Pointer<Option<Provenance>>
)
fn alloc_extern_static(
this: &mut MiriInterpCx<'mir, 'tcx>,
name: &str,
val: ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx>
sourcefn init_extern_statics(
this: &mut MiriInterpCx<'mir, 'tcx>
) -> InterpResult<'tcx>
fn init_extern_statics(
this: &mut MiriInterpCx<'mir, 'tcx>
) -> InterpResult<'tcx>
Sets up the “extern statics” for this machine.
pub(crate) fn communicate(&self) -> bool
Trait Implementations§
source§impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> Machine<'mir, 'tcx> for MiriMachine<'mir, 'tcx>
Machine hook implementations.
source§fn ptr_get_alloc(
ecx: &MiriInterpCx<'mir, 'tcx>,
ptr: Pointer<Self::Provenance>
) -> Option<(AllocId, Size, Self::ProvenanceExtra)>
fn ptr_get_alloc(
ecx: &MiriInterpCx<'mir, 'tcx>,
ptr: Pointer<Self::Provenance>
) -> Option<(AllocId, Size, Self::ProvenanceExtra)>
Convert a pointer with provenance into an allocation-offset pair,
or a None
with an absolute address if that conversion is not possible.
§type MemoryKind = MiriMemoryKind
type MemoryKind = MiriMemoryKind
§type ExtraFnVal = Dlsym
type ExtraFnVal = Dlsym
dlsym
that can later be called to execute the right thing. Read more§type FrameExtra = FrameExtra<'tcx>
type FrameExtra = FrameExtra<'tcx>
§type AllocExtra = AllocExtra
type AllocExtra = AllocExtra
§type Provenance = Provenance
type Provenance = Provenance
AllocId
they belong to.§type ProvenanceExtra = ProvenanceExtra
type ProvenanceExtra = ProvenanceExtra
§type MemoryMap = MonoHashMap<AllocId, (MemoryKind<MiriMemoryKind>, Allocation<Provenance, <MiriMachine<'mir, 'tcx> as Machine<'mir, 'tcx>>::AllocExtra>)>
type MemoryMap = MonoHashMap<AllocId, (MemoryKind<MiriMemoryKind>, Allocation<Provenance, <MiriMachine<'mir, 'tcx> as Machine<'mir, 'tcx>>::AllocExtra>)>
source§const GLOBAL_KIND: Option<MiriMemoryKind> = _
const GLOBAL_KIND: Option<MiriMemoryKind> = _
tcx
) –
or None if such memory should not be mutated and thus any such attempt will cause
a ModifiedStatic
error to be raised.
Statics are copied under two circumstances: When they are mutated, and when
adjust_allocation
(see below) returns an owned allocation
that is added to the memory so that the work is not done twice. Read moresource§const PANIC_ON_ALLOC_FAIL: bool = false
const PANIC_ON_ALLOC_FAIL: bool = false
source§fn enforce_alignment(ecx: &MiriInterpCx<'mir, 'tcx>) -> CheckAlignment
fn enforce_alignment(ecx: &MiriInterpCx<'mir, 'tcx>) -> CheckAlignment
source§fn use_addr_for_alignment_check(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
fn use_addr_for_alignment_check(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
fn alignment_check_failed(
_ecx: &InterpCx<'mir, 'tcx, Self>,
has: Align,
required: Align,
_check: CheckAlignment
) -> InterpResult<'tcx, ()>
source§fn enforce_validity(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
fn enforce_validity(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
source§fn enforce_abi(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
fn enforce_abi(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
source§fn checked_binop_checks_overflow(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
fn checked_binop_checks_overflow(ecx: &MiriInterpCx<'mir, 'tcx>) -> bool
source§fn find_mir_or_eval_fn(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
instance: Instance<'tcx>,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: StackPopUnwind
) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>
fn find_mir_or_eval_fn(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
instance: Instance<'tcx>,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: StackPopUnwind
) -> InterpResult<'tcx, Option<(&'mir Body<'tcx>, Instance<'tcx>)>>
source§fn call_extra_fn(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
fn_val: Dlsym,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
_unwind: StackPopUnwind
) -> InterpResult<'tcx>
fn call_extra_fn(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
fn_val: Dlsym,
abi: Abi,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
_unwind: StackPopUnwind
) -> InterpResult<'tcx>
fn_val
. It is the hook’s responsibility to advance the instruction
pointer as appropriate. Read moresource§fn call_intrinsic(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
instance: Instance<'tcx>,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: StackPopUnwind
) -> InterpResult<'tcx>
fn call_intrinsic(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
instance: Instance<'tcx>,
args: &[OpTy<'tcx, Provenance>],
dest: &PlaceTy<'tcx, Provenance>,
ret: Option<BasicBlock>,
unwind: StackPopUnwind
) -> InterpResult<'tcx>
source§fn assert_panic(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
msg: &AssertMessage<'tcx>,
unwind: Option<BasicBlock>
) -> InterpResult<'tcx>
fn assert_panic(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
msg: &AssertMessage<'tcx>,
unwind: Option<BasicBlock>
) -> InterpResult<'tcx>
Assert
MIR terminators that trigger a panic.source§fn abort(
_ecx: &mut MiriInterpCx<'mir, 'tcx>,
msg: String
) -> InterpResult<'tcx, !>
fn abort(
_ecx: &mut MiriInterpCx<'mir, 'tcx>,
msg: String
) -> InterpResult<'tcx, !>
Abort
MIR terminator.source§fn binary_ptr_op(
ecx: &MiriInterpCx<'mir, 'tcx>,
bin_op: BinOp,
left: &ImmTy<'tcx, Provenance>,
right: &ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx, (Scalar<Provenance>, bool, Ty<'tcx>)>
fn binary_ptr_op(
ecx: &MiriInterpCx<'mir, 'tcx>,
bin_op: BinOp,
left: &ImmTy<'tcx, Provenance>,
right: &ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx, (Scalar<Provenance>, bool, Ty<'tcx>)>
source§fn thread_local_static_base_pointer(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
def_id: DefId
) -> InterpResult<'tcx, Pointer<Provenance>>
fn thread_local_static_base_pointer(
ecx: &mut MiriInterpCx<'mir, 'tcx>,
def_id: DefId
) -> InterpResult<'tcx, Pointer<Provenance>>
AllocId
for the given thread-local static in the current thread.source§fn extern_static_base_pointer(
ecx: &MiriInterpCx<'mir, 'tcx>,
def_id: DefId
) -> InterpResult<'tcx, Pointer<Provenance>>
fn extern_static_base_pointer(
ecx: &MiriInterpCx<'mir, 'tcx>,
def_id: DefId
) -> InterpResult<'tcx, Pointer<Provenance>>
extern static
.source§fn adjust_allocation<'b>(
ecx: &MiriInterpCx<'mir, 'tcx>,
id: AllocId,
alloc: Cow<'b, Allocation>,
kind: Option<MemoryKind<Self::MemoryKind>>
) -> InterpResult<'tcx, Cow<'b, Allocation<Self::Provenance, Self::AllocExtra>>>
fn adjust_allocation<'b>(
ecx: &MiriInterpCx<'mir, 'tcx>,
id: AllocId,
alloc: Cow<'b, Allocation>,
kind: Option<MemoryKind<Self::MemoryKind>>
) -> InterpResult<'tcx, Cow<'b, Allocation<Self::Provenance, Self::AllocExtra>>>
source§fn adjust_alloc_base_pointer(
ecx: &MiriInterpCx<'mir, 'tcx>,
ptr: Pointer<AllocId>
) -> Pointer<Provenance>
fn adjust_alloc_base_pointer(
ecx: &MiriInterpCx<'mir, 'tcx>,
ptr: Pointer<AllocId>
) -> Pointer<Provenance>
source§fn ptr_from_addr_cast(
ecx: &MiriInterpCx<'mir, 'tcx>,
addr: u64
) -> InterpResult<'tcx, Pointer<Option<Self::Provenance>>>
fn ptr_from_addr_cast(
ecx: &MiriInterpCx<'mir, 'tcx>,
addr: u64
) -> InterpResult<'tcx, Pointer<Option<Self::Provenance>>>
source§fn expose_ptr(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
ptr: Pointer<Self::Provenance>
) -> InterpResult<'tcx>
fn expose_ptr(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
ptr: Pointer<Self::Provenance>
) -> InterpResult<'tcx>
source§fn before_memory_read(
_tcx: TyCtxt<'tcx>,
machine: &Self,
alloc_extra: &AllocExtra,
(alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra),
range: AllocRange
) -> InterpResult<'tcx>
fn before_memory_read(
_tcx: TyCtxt<'tcx>,
machine: &Self,
alloc_extra: &AllocExtra,
(alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra),
range: AllocRange
) -> InterpResult<'tcx>
source§fn before_memory_write(
_tcx: TyCtxt<'tcx>,
machine: &mut Self,
alloc_extra: &mut AllocExtra,
(alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra),
range: AllocRange
) -> InterpResult<'tcx>
fn before_memory_write(
_tcx: TyCtxt<'tcx>,
machine: &mut Self,
alloc_extra: &mut AllocExtra,
(alloc_id, prov_extra): (AllocId, Self::ProvenanceExtra),
range: AllocRange
) -> InterpResult<'tcx>
source§fn before_memory_deallocation(
_tcx: TyCtxt<'tcx>,
machine: &mut Self,
alloc_extra: &mut AllocExtra,
(alloc_id, prove_extra): (AllocId, Self::ProvenanceExtra),
range: AllocRange
) -> InterpResult<'tcx>
fn before_memory_deallocation(
_tcx: TyCtxt<'tcx>,
machine: &mut Self,
alloc_extra: &mut AllocExtra,
(alloc_id, prove_extra): (AllocId, Self::ProvenanceExtra),
range: AllocRange
) -> InterpResult<'tcx>
source§fn retag_ptr_value(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
kind: RetagKind,
val: &ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
fn retag_ptr_value(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
kind: RetagKind,
val: &ImmTy<'tcx, Provenance>
) -> InterpResult<'tcx, ImmTy<'tcx, Provenance>>
source§fn retag_place_contents(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
kind: RetagKind,
place: &PlaceTy<'tcx, Provenance>
) -> InterpResult<'tcx>
fn retag_place_contents(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
kind: RetagKind,
place: &PlaceTy<'tcx, Provenance>
) -> InterpResult<'tcx>
source§fn init_frame_extra(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
frame: Frame<'mir, 'tcx, Provenance>
) -> InterpResult<'tcx, Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>>
fn init_frame_extra(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
frame: Frame<'mir, 'tcx, Provenance>
) -> InterpResult<'tcx, Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>>
source§fn stack<'a>(
ecx: &'a InterpCx<'mir, 'tcx, Self>
) -> &'a [Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra>]
fn stack<'a>(
ecx: &'a InterpCx<'mir, 'tcx, Self>
) -> &'a [Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra>]
source§fn stack_mut<'a>(
ecx: &'a mut InterpCx<'mir, 'tcx, Self>
) -> &'a mut Vec<Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra>> ⓘ
fn stack_mut<'a>(
ecx: &'a mut InterpCx<'mir, 'tcx, Self>
) -> &'a mut Vec<Frame<'mir, 'tcx, Self::Provenance, Self::FrameExtra>> ⓘ
source§fn before_terminator(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>
fn before_terminator(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>
source§fn after_stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>
fn after_stack_push(ecx: &mut InterpCx<'mir, 'tcx, Self>) -> InterpResult<'tcx>
source§fn after_stack_pop(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
frame: Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>,
unwinding: bool
) -> InterpResult<'tcx, StackPopJump>
fn after_stack_pop(
ecx: &mut InterpCx<'mir, 'tcx, Self>,
frame: Frame<'mir, 'tcx, Provenance, FrameExtra<'tcx>>,
unwinding: bool
) -> InterpResult<'tcx, StackPopJump>
locals
have already been destroyed! Read moresource§fn load_mir(
ecx: &InterpCx<'mir, 'tcx, Self>,
instance: InstanceDef<'tcx>
) -> Result<&'tcx Body<'tcx>, InterpErrorInfo<'tcx>>
fn load_mir(
ecx: &InterpCx<'mir, 'tcx, Self>,
instance: InstanceDef<'tcx>
) -> Result<&'tcx Body<'tcx>, InterpErrorInfo<'tcx>>
source§fn access_local_mut<'a>(
ecx: &'a mut InterpCx<'mir, 'tcx, Self>,
frame: usize,
local: Local
) -> Result<&'a mut Operand<Self::Provenance>, InterpErrorInfo<'tcx>>where
'tcx: 'mir,
fn access_local_mut<'a>(
ecx: &'a mut InterpCx<'mir, 'tcx, Self>,
frame: usize,
local: Local
) -> Result<&'a mut Operand<Self::Provenance>, InterpErrorInfo<'tcx>>where
'tcx: 'mir,
local
from the frame
.
Since writing a ZST is not actually accessing memory or locals, this is never invoked
for ZST reads. Read moresource§fn before_access_global(
_tcx: TyCtxt<'tcx>,
_machine: &Self,
_alloc_id: AllocId,
_allocation: ConstAllocation<'tcx>,
_static_def_id: Option<DefId>,
_is_write: bool
) -> Result<(), InterpErrorInfo<'tcx>>
fn before_access_global(
_tcx: TyCtxt<'tcx>,
_machine: &Self,
_alloc_id: AllocId,
_allocation: ConstAllocation<'tcx>,
_static_def_id: Option<DefId>,
_is_write: bool
) -> Result<(), InterpErrorInfo<'tcx>>
def_id
is Some
if this is the “lazy” allocation of a static. Read morefn eval_inline_asm(
_ecx: &mut InterpCx<'mir, 'tcx, Self>,
_template: &'tcx [InlineAsmTemplatePiece],
_operands: &[InlineAsmOperand<'tcx>],
_options: InlineAsmOptions
) -> Result<(), InterpErrorInfo<'tcx>>
source§impl VisitTags for MiriMachine<'_, '_>
impl VisitTags for MiriMachine<'_, '_>
Auto Trait Implementations§
impl<'mir, 'tcx> !RefUnwindSafe for MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> !Send for MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> !Sync for MiriMachine<'mir, 'tcx>
impl<'mir, 'tcx> Unpin for MiriMachine<'mir, 'tcx>where
'tcx: 'mir,
impl<'mir, 'tcx> !UnwindSafe for MiriMachine<'mir, 'tcx>
Blanket Implementations§
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference’s “Type Layout” chapter for details on type layout guarantees.
Size: 2256 bytes