Struct miri::stacked_borrows::GlobalStateInner
source · [−]pub struct GlobalStateInner {
next_ptr_tag: SbTag,
base_ptr_tags: FxHashMap<AllocId, SbTag>,
next_call_id: CallId,
active_calls: FxHashSet<CallId>,
tracked_pointer_tags: HashSet<SbTag>,
tracked_call_ids: HashSet<CallId>,
retag_fields: bool,
}Expand description
Extra global state, available to the memory access hooks.
Fields
next_ptr_tag: SbTagNext unused pointer ID (tag).
Table storing the “base” tag for each allocation. The base tag is the one used for the initial pointer. We need this in a separate table to handle cyclic statics.
next_call_id: CallIdNext unused call ID (for protectors).
active_calls: FxHashSet<CallId>Those call IDs corresponding to functions that are still running.
The pointer ids to trace
tracked_call_ids: HashSet<CallId>The call ids to trace
retag_fields: boolWhether to recurse into datatypes when searching for pointers to retag.
Implementations
sourceimpl GlobalStateInner
impl GlobalStateInner
Utilities for initialization and ID generation
pub fn new(
tracked_pointer_tags: HashSet<SbTag>,
tracked_call_ids: HashSet<CallId>,
retag_fields: bool
) -> Self
sourcefn new_ptr(&mut self) -> SbTag
fn new_ptr(&mut self) -> SbTag
Generates a new pointer tag. Remember to also check track_pointer_tags and log its creation!
pub fn new_call(&mut self) -> CallId
pub fn end_call(&mut self, id: CallId)
fn is_active(&self, id: CallId) -> bool
pub fn base_ptr_tag(&mut self, id: AllocId) -> SbTag
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for GlobalStateInner
impl Send for GlobalStateInner
impl Sync for GlobalStateInner
impl Unpin for GlobalStateInner
impl UnwindSafe for GlobalStateInner
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
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: 184 bytes