From 63a51a6b19b3378acc3a41e2d0d334490b19fd2d Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Tue, 15 Aug 2023 19:26:53 -0400 Subject: [PATCH] Explain why we save spans for some memory types and not others Co-authored-by: Ralf Jung --- src/tools/miri/src/machine.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/miri/src/machine.rs b/src/tools/miri/src/machine.rs index 5fc3a5faeb1..99eda0dff66 100644 --- a/src/tools/miri/src/machine.rs +++ b/src/tools/miri/src/machine.rs @@ -140,7 +140,9 @@ impl MiriMemoryKind { fn should_save_allocation_span(self) -> bool { use self::MiriMemoryKind::*; match self { + // Heap allocations are fine since the `Allocation` is created immediately. Rust | Miri | C | Mmap => true, + // Everything else is unclear, let's not show potentially confusing spans. Machine | Global | ExternStatic | Tls | WinHeap | Runtime => false, } }