explicitly list memory kinds for stacked borrows

This commit is contained in:
Ralf Jung 2021-07-06 10:04:16 +02:00
parent 15e81a94b1
commit efd582c6d8

View File

@ -513,8 +513,14 @@ pub fn new_allocation(
| 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)