miri::alloc_addresses

Trait EvalContextExt

Source
pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> {
    // Provided methods
    fn expose_ptr(&self, alloc_id: AllocId, tag: BorTag) -> InterpResult<'tcx> { ... }
    fn ptr_from_addr_cast(&self, addr: u64) -> InterpResult<'tcx, Pointer> { ... }
    fn adjust_alloc_root_pointer(
        &self,
        ptr: Pointer<CtfeProvenance>,
        tag: BorTag,
        kind: MemoryKind,
    ) -> InterpResult<'tcx, Pointer<Provenance>> { ... }
    fn get_global_alloc_bytes(
        &self,
        id: AllocId,
        kind: MemoryKind,
        bytes: &[u8],
        align: Align,
    ) -> InterpResult<'tcx, MiriAllocBytes> { ... }
    fn ptr_get_alloc(
        &self,
        ptr: Pointer<Provenance>,
        size: i64,
    ) -> Option<(AllocId, Size)> { ... }
}

Provided Methods§

Source

fn expose_ptr(&self, alloc_id: AllocId, tag: BorTag) -> InterpResult<'tcx>

Source

fn ptr_from_addr_cast(&self, addr: u64) -> InterpResult<'tcx, Pointer>

Source

fn adjust_alloc_root_pointer( &self, ptr: Pointer<CtfeProvenance>, tag: BorTag, kind: MemoryKind, ) -> InterpResult<'tcx, Pointer<Provenance>>

Convert a relative (tcx) pointer to a Miri pointer.

Source

fn get_global_alloc_bytes( &self, id: AllocId, kind: MemoryKind, bytes: &[u8], align: Align, ) -> InterpResult<'tcx, MiriAllocBytes>

Source

fn ptr_get_alloc( &self, ptr: Pointer<Provenance>, size: i64, ) -> Option<(AllocId, Size)>

When a pointer is used for a memory access, this computes where in which allocation the access is going.

Implementors§

Source§

impl<'tcx> EvalContextExt<'tcx> for MiriInterpCx<'tcx>