Skip to content

Commit

Permalink
Miri: GC the dead_alloc_map too
Browse files Browse the repository at this point in the history
  • Loading branch information
saethlin committed Nov 23, 2023
1 parent e146fdd commit 02d9362
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/provenance_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
}

fn remove_unreachable_allocs(&mut self, allocs: FxHashSet<AllocId>) {
let this = self.eval_context_ref();
let this = self.eval_context_mut();
let allocs = LiveAllocs {
ecx: this,
collected: allocs,
Expand All @@ -205,5 +205,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> {
if let Some(borrow_tracker) = &this.machine.borrow_tracker {
borrow_tracker.borrow_mut().remove_unreachable_allocs(&allocs);
}
this.remove_unreachable_allocs(&allocs.collected);
}
}

0 comments on commit 02d9362

Please sign in to comment.