Skip to content

Feature request: controlling tracking from inside the program #2353

Open
@CAD97

Description

@CAD97

Specifically,

#[cfg(miri)]
extern "Rust" {
    /// Start tracking the pointee alloc id as if -Zmiri-track-alloc-id was used
    fn miri_start_tracking_alloc(ptr: *mut ());
    /// Stop tracking the pointee alloc id
    fn miri_stop_tracking_alloc(ptr: *mut ());
    /// Print the alloc id as if tracking was triggered
    fn miri_track_alloc(ptr: *mut ());
    
    /// Start tracking the pointer tag as if -Zmiri-track-pointer-tag was used
    fn miri_start_tracking_tag(ptr: *mut ());
    /// Stop tracking the pointer tag
    fn miri_stop_tracking_tag(ptr: *mut ());
    /// Print the pointer tag as if tracking was triggered
    fn miri_track_tag(ptr: *mut ());
}

Names are bikeshedable of course.

The primary advantage of this is being able to track behavior (so long as source edits are workable) without "guessing" the correct alloc/tag id.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-uxArea: This affects the general user experienceC-projectCategory: a larger project is being tracked here, usually with checkmarks for individual steps

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions