tag-gc -> provenance-gc

This commit is contained in:
Ben Kimock 2023-11-17 20:47:38 -05:00
parent 0d0a41789f
commit 0ec82fa9d3
14 changed files with 18 additions and 18 deletions

View File

@ -37,7 +37,7 @@ jobs:
- name: Set the tag GC interval to 1 on linux
if: runner.os == 'Linux'
run: echo "MIRIFLAGS=-Zmiri-tag-gc=1" >> $GITHUB_ENV
run: echo "MIRIFLAGS=-Zmiri-provenance-gc=1" >> $GITHUB_ENV
# Cache the global cargo directory, but NOT the local `target` directory which
# we cannot reuse anyway when the nightly changes (and it grows quite large

View File

@ -411,10 +411,10 @@ to Miri failing to detect cases of undefined behavior in a program.
without an explicit value), `none` means it never recurses, `scalar` means it only recurses for
types where we would also emit `noalias` annotations in the generated LLVM IR (types passed as
individual scalars or pairs of scalars). Setting this to `none` is **unsound**.
* `-Zmiri-tag-gc=<blocks>` configures how often the pointer tag garbage collector runs. The default
is to search for and remove unreachable tags once every `10000` basic blocks. Setting this to
`0` disables the garbage collector, which causes some programs to have explosive memory usage
and/or super-linear runtime.
* `-Zmiri-provenance-gc=<blocks>` configures how often the pointer provenance garbage collector runs.
The default is to search for and remove unreachable provenance once every `10000` basic blocks. Setting
this to `0` disables the garbage collector, which causes some programs to have explosive memory
usage and/or super-linear runtime.
* `-Zmiri-track-alloc-id=<id1>,<id2>,...` shows a backtrace when the given allocations are
being allocated or freed. This helps in debugging memory leaks and
use after free bugs. Specifying this argument multiple times does not overwrite the previous

View File

@ -531,10 +531,10 @@ fn main() {
Err(err) => show_error!("-Zmiri-report-progress requires a `u32`: {}", err),
};
miri_config.report_progress = Some(interval);
} else if let Some(param) = arg.strip_prefix("-Zmiri-tag-gc=") {
} else if let Some(param) = arg.strip_prefix("-Zmiri-provenance-gc=") {
let interval = match param.parse::<u32>() {
Ok(i) => i,
Err(err) => show_error!("-Zmiri-tag-gc requires a `u32`: {}", err),
Err(err) => show_error!("-Zmiri-provenance-gc requires a `u32`: {}", err),
};
miri_config.gc_interval = interval;
} else if let Some(param) = arg.strip_prefix("-Zmiri-measureme=") {

View File

@ -200,7 +200,7 @@ impl<'tcx> Tree {
/// Climb the tree to get the tag of a distant ancestor.
/// Allows operations on tags that are unreachable by the program
/// but still exist in the tree. Not guaranteed to perform consistently
/// if `tag-gc=1`.
/// if `provenance-gc=1`.
fn nth_parent(&self, tag: BorTag, nth_parent: u8) -> Option<BorTag> {
let mut idx = self.tag_mapping.get(&tag).unwrap();
for _ in 0..nth_parent {

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
// Check how a Reserved with interior mutability
// responds to a Foreign Write under a Protector

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
#[path = "../../../utils/mod.rs"]
#[macro_use]

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
#[path = "../../utils/mod.rs"]
#[macro_use]
mod utils;

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
// Check that a protector goes back to normal behavior when the function
// returns.

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
#[path = "../../utils/mod.rs"]
#[macro_use]

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
#[path = "../../utils/mod.rs"]
#[macro_use]

View File

@ -1,4 +1,4 @@
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
#[path = "../../utils/mod.rs"]
#[macro_use]

View File

@ -1,5 +1,5 @@
//@revisions: default uniq
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
//@[uniq]compile-flags: -Zmiri-unique-is-unique
#![feature(ptr_internals)]

View File

@ -1,5 +1,5 @@
//@revisions: default uniq
//@compile-flags: -Zmiri-tree-borrows -Zmiri-tag-gc=0
//@compile-flags: -Zmiri-tree-borrows -Zmiri-provenance-gc=0
//@[uniq]compile-flags: -Zmiri-unique-is-unique
#![feature(vec_into_raw_parts)]

View File

@ -84,7 +84,7 @@ pub fn miri_resolve_frame_names(
///
/// The format of what this emits is unstable and may change at any time. In particular, users should be
/// aware that Miri will periodically attempt to garbage collect the contents of all stacks. Callers of
/// this function may wish to pass `-Zmiri-tag-gc=0` to disable the GC.
/// this function may wish to pass `-Zmiri-provenance-gc=0` to disable the GC.
///
/// This function is extremely unstable. At any time the format of its output may change, its signature may
/// change, or it may be removed entirely.