diff options
| author | Ralf Jung <post@ralfj.de> | 2024-08-19 08:17:24 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-08-19 08:17:24 +0200 |
| commit | 4abdcd7fd9767238e695eed65667756ed9bf00c5 (patch) | |
| tree | d7e3b4aa083085ce033b43091c01f83f65757cb5 | |
| parent | c74ffd88cb0fc13b1399eb4b75abc8b386386e5a (diff) | |
| download | rust-4abdcd7fd9767238e695eed65667756ed9bf00c5.tar.gz rust-4abdcd7fd9767238e695eed65667756ed9bf00c5.zip | |
provenance_gc: fix comment
| -rw-r--r-- | src/tools/miri/src/provenance_gc.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/tools/miri/src/provenance_gc.rs b/src/tools/miri/src/provenance_gc.rs index 8edd80744dd..5c6edf4ddce 100644 --- a/src/tools/miri/src/provenance_gc.rs +++ b/src/tools/miri/src/provenance_gc.rs @@ -187,9 +187,9 @@ impl LiveAllocs<'_, '_> { impl<'tcx> EvalContextExt<'tcx> for crate::MiriInterpCx<'tcx> {} pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> { fn run_provenance_gc(&mut self) { - // We collect all tags from various parts of the interpreter, but also let this = self.eval_context_mut(); + // We collect all tags and AllocId from every part of the interpreter. let mut tags = FxHashSet::default(); let mut alloc_ids = FxHashSet::default(); this.visit_provenance(&mut |id, tag| { @@ -200,6 +200,8 @@ pub trait EvalContextExt<'tcx>: MiriInterpCxExt<'tcx> { tags.insert(tag); } }); + + // Based on this, clean up the interpreter state. self.remove_unreachable_tags(tags); self.remove_unreachable_allocs(alloc_ids); } |
