Skip to content

Commit cdf1071

Browse files
committed
Auto merge of rust-lang#3346 - RalfJung:alloc-accesses, r=RalfJung
Add -Zmiri-track-alloc-accesses to readme and fix its wording I forgot that yesterday...
2 parents 31957b6 + 931e453 commit cdf1071

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/tools/miri/README.md

+2
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ to Miri failing to detect cases of undefined behavior in a program.
412412
The default is to search for and remove unreachable provenance once every `10000` basic blocks. Setting
413413
this to `0` disables the garbage collector, which causes some programs to have explosive memory
414414
usage and/or super-linear runtime.
415+
* `-Zmiri-track-alloc-accesses` show not only allocation and free events for tracked allocations,
416+
but also reads and writes.
415417
* `-Zmiri-track-alloc-id=<id1>,<id2>,...` shows a backtrace when the given allocations are
416418
being allocated or freed. This helps in debugging memory leaks and
417419
use after free bugs. Specifying this argument multiple times does not overwrite the previous

src/tools/miri/src/diagnostics.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -562,7 +562,7 @@ impl<'mir, 'tcx> MiriMachine<'mir, 'tcx> {
562562
align = align.bytes(),
563563
),
564564
AccessedAlloc(AllocId(id), access_kind) =>
565-
format!("{access_kind} access to allocation with id {id}"),
565+
format!("{access_kind} to allocation with id {id}"),
566566
FreedAlloc(AllocId(id)) => format!("freed allocation with id {id}"),
567567
RejectedIsolatedOp(ref op) =>
568568
format!("{op} was made to return an error due to isolation"),

0 commit comments

Comments
 (0)