From efd582c6d8f14ffd730c5911101789e40eccec31 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 6 Jul 2021 10:04:16 +0200 Subject: [PATCH] explicitly list memory kinds for stacked borrows --- src/stacked_borrows.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/stacked_borrows.rs b/src/stacked_borrows.rs index 3e176d94b99..32cecf855d4 100644 --- a/src/stacked_borrows.rs +++ b/src/stacked_borrows.rs @@ -513,8 +513,14 @@ impl Stacks { | MiriMemoryKind::Tls | MiriMemoryKind::Env, ) => (extra.global_base_ptr(id), Permission::SharedReadWrite), - // Everything else we handle like raw pointers for now. - _ => { + // Everything else we only track precisely when raw pointers are tagged, for now. + MemoryKind::CallerLocation + | MemoryKind::Machine( + MiriMemoryKind::Rust + | MiriMemoryKind::C + | MiriMemoryKind::WinHeap + | MiriMemoryKind::Machine, + ) => { let tag = if extra.track_raw { Tag::Tagged(extra.new_ptr()) } else { Tag::Untagged }; (tag, Permission::SharedReadWrite)