diff options
| author | Ben Kimock <kimockb@gmail.com> | 2023-08-15 19:26:53 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-15 19:26:53 -0400 |
| commit | 63a51a6b19b3378acc3a41e2d0d334490b19fd2d (patch) | |
| tree | 15665a1154b294d54984411788dc5e4db19f358a | |
| parent | 1852bb8d620e6a67da5703f5e4500a17c511e200 (diff) | |
| download | rust-63a51a6b19b3378acc3a41e2d0d334490b19fd2d.tar.gz rust-63a51a6b19b3378acc3a41e2d0d334490b19fd2d.zip | |
Explain why we save spans for some memory types and not others
Co-authored-by: Ralf Jung <post@ralfj.de>
| -rw-r--r-- | src/tools/miri/src/machine.rs | 2 |
1 files changed, 2 insertions, 0 deletions
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, } } |
