From 7f485fc923c10990cd5b12c2e217d54bf00e0b91 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 3 Mar 2024 10:12:19 +0100 Subject: [PATCH 1/2] readme --- src/tools/miri/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tools/miri/README.md b/src/tools/miri/README.md index 2b5ffb1a33d..5eb8c0fa7c9 100644 --- a/src/tools/miri/README.md +++ b/src/tools/miri/README.md @@ -412,6 +412,8 @@ to Miri failing to detect cases of undefined behavior in a program. The default is to search for and remove unreachable provenance once every `10000` basic blocks. Setting this to `0` disables the garbage collector, which causes some programs to have explosive memory usage and/or super-linear runtime. +* `-Zmiri-track-alloc-accesses` show not only allocation and free events for tracked allocations, + but also reads and writes. * `-Zmiri-track-alloc-id=,,...` shows a backtrace when the given allocations are being allocated or freed. This helps in debugging memory leaks and use after free bugs. Specifying this argument multiple times does not overwrite the previous From 931e45389a67f2f275d5b3829c227900aeb65514 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 3 Mar 2024 10:27:24 +0100 Subject: [PATCH 2/2] fix wording of alloc access tracking message --- src/tools/miri/src/diagnostics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 7afcf919b91..de0ed879b36 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -562,7 +562,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> { align = align.bytes(), ), AccessedAlloc(AllocId(id), access_kind) => - format!("{access_kind} access to allocation with id {id}"), + format!("{access_kind} to allocation with id {id}"), FreedAlloc(AllocId(id)) => format!("freed allocation with id {id}"), RejectedIsolatedOp(ref op) => format!("{op} was made to return an error due to isolation"),