pub type AllocState = VClockAlloc;

Aliased Type§

struct AllocState {
    alloc_ranges: RefCell<RangeMap<MemoryCellClocks>>,
}

Fields§

§alloc_ranges: RefCell<RangeMap<MemoryCellClocks>>

Assigning each byte a MemoryCellClocks.

Implementations§

source§

impl VClockAlloc

source

pub fn new_allocation( global: &GlobalState, thread_mgr: &ThreadManager<'_, '_>, len: Size, kind: MemoryKind<MiriMemoryKind>, current_span: Span ) -> VClockAlloc

Create a new data-race detector for newly allocated memory.

source

fn find_gt_index(l: &VClock, r: &VClock) -> Option<VectorIdx>

source

fn report_data_race<'tcx>( global: &GlobalState, thread_mgr: &ThreadManager<'_, '_>, mem_clocks: &MemoryCellClocks, action: &str, is_atomic: bool, ptr_dbg: Pointer<AllocId> ) -> InterpResult<'tcx>

Report a data-race found in the program. This finds the two racing threads and the type of data-race that occurred. This will also return info about the memory location the data-race occurred in.

source

pub(super) fn race_free_with_atomic( &self, range: AllocRange, global: &GlobalState, thread_mgr: &ThreadManager<'_, '_> ) -> bool

Detect racing atomic read and writes (not data races) on every byte of the current access range

source

pub fn read<'tcx>( &self, alloc_id: AllocId, access_range: AllocRange, machine: &MiriMachine<'_, '_> ) -> InterpResult<'tcx>

Detect data-races for an unsynchronized read operation, will not perform data-race detection if race_detecting() is false, either due to no threads being created or if it is temporarily disabled during a racy read or write operation for which data-race detection is handled separately, for example atomic read operations.

source

fn unique_access<'tcx>( &mut self, alloc_id: AllocId, access_range: AllocRange, write_type: WriteType, machine: &mut MiriMachine<'_, '_> ) -> InterpResult<'tcx>

source

pub fn write<'tcx>( &mut self, alloc_id: AllocId, range: AllocRange, machine: &mut MiriMachine<'_, '_> ) -> InterpResult<'tcx>

Detect data-races for an unsynchronized write operation, will not perform data-race threads if race_detecting() is false, either due to no threads being created or if it is temporarily disabled during a racy read or write operation

source

pub fn deallocate<'tcx>( &mut self, alloc_id: AllocId, range: AllocRange, machine: &mut MiriMachine<'_, '_> ) -> InterpResult<'tcx>

Detect data-races for an unsynchronized deallocate operation, will not perform data-race threads if race_detecting() is false, either due to no threads being created or if it is temporarily disabled during a racy read or write operation

Trait Implementations§

source§

impl Clone for VClockAlloc

source§

fn clone(&self) -> VClockAlloc

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for VClockAlloc

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl VisitTags for VClockAlloc

source§

fn visit_tags(&self, _visit: &mut dyn FnMut(BorTag))

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: 32 bytes