Skip to content

Commit efd582c

Browse files
committed
explicitly list memory kinds for stacked borrows
1 parent 15e81a9 commit efd582c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/stacked_borrows.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,14 @@ impl Stacks {
513513
| MiriMemoryKind::Tls
514514
| MiriMemoryKind::Env,
515515
) => (extra.global_base_ptr(id), Permission::SharedReadWrite),
516-
// Everything else we handle like raw pointers for now.
517-
_ => {
516+
// Everything else we only track precisely when raw pointers are tagged, for now.
517+
MemoryKind::CallerLocation
518+
| MemoryKind::Machine(
519+
MiriMemoryKind::Rust
520+
| MiriMemoryKind::C
521+
| MiriMemoryKind::WinHeap
522+
| MiriMemoryKind::Machine,
523+
) => {
518524
let tag =
519525
if extra.track_raw { Tag::Tagged(extra.new_ptr()) } else { Tag::Untagged };
520526
(tag, Permission::SharedReadWrite)

0 commit comments

Comments
 (0)