diff options
| author | Ben Kimock <kimockb@gmail.com> | 2022-12-21 21:11:19 -0500 |
|---|---|---|
| committer | Ben Kimock <kimockb@gmail.com> | 2022-12-21 21:11:19 -0500 |
| commit | c2f459ca74ee3724c273ca6fccf4015a67fc4a7d (patch) | |
| tree | dbc666e2e0539a897d4711651d2a0a16bf6155a5 | |
| parent | 749b2b077d0e350dd3ebeac014ab1f3c31d92ca3 (diff) | |
| download | rust-c2f459ca74ee3724c273ca6fccf4015a67fc4a7d.tar.gz rust-c2f459ca74ee3724c273ca6fccf4015a67fc4a7d.zip | |
Clean up implementation, deduplicate in errors
31 files changed, 103 insertions, 255 deletions
diff --git a/src/tools/miri/src/concurrency/data_race.rs b/src/tools/miri/src/concurrency/data_race.rs index 2d825b369c2..5dcaebadc42 100644 --- a/src/tools/miri/src/concurrency/data_race.rs +++ b/src/tools/miri/src/concurrency/data_race.rs @@ -358,15 +358,9 @@ impl MemoryCellClocks { index: VectorIdx, ) -> Result<(), DataRace> { log::trace!("Atomic read with vectors: {:#?} :: {:#?}", self, clocks); - if self.write <= clocks.clock[self.write_index] { - let atomic = self.atomic_mut(); - atomic.read_vector.set_at_index(&clocks.clock, index); - Ok(()) - } else { - let atomic = self.atomic_mut(); - atomic.read_vector.set_at_index(&clocks.clock, index); - Err(DataRace) - } + let atomic = self.atomic_mut(); + atomic.read_vector.set_at_index(&clocks.clock, index); + if self.write <= clocks.clock[self.write_index] { Ok(()) } else { Err(DataRace) } } /// Detect data-races with an atomic write, either with a non-atomic read or with @@ -377,13 +371,11 @@ impl MemoryCellClocks { index: VectorIdx, ) -> Result<(), DataRace> { log::trace!("Atomic write with vectors: {:#?} :: {:#?}", self, clocks); + let atomic = self.atomic_mut(); + atomic.write_vector.set_at_index(&clocks.clock, index); if self.write <= clocks.clock[self.write_index] && self.read <= clocks.clock { - let atomic = self.atomic_mut(); - atomic.write_vector.set_at_index(&clocks.clock, index); Ok(()) } else { - let atomic = self.atomic_mut(); - atomic.write_vector.set_at_index(&clocks.clock, index); Err(DataRace) } } @@ -635,6 +627,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> { if let Some(data_race) = &mut this.machine.data_race { data_race.maybe_perform_sync_operation( &this.machine.threads, + current_span, |index, mut clocks| { log::trace!("Atomic fence on {:?} with ordering {:?}", index, atomic); @@ -658,7 +651,6 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> { // Increment timestamp in case of release semantics. Ok(atomic != AtomicFenceOrd::Acquire) }, - current_span, ) } else { Ok(()) @@ -721,7 +713,7 @@ impl VClockAlloc { | MiriMemoryKind::ExternStatic | MiriMemoryKind::Tls, ) - | MemoryKind::CallerLocation => (VTimestamp::NONE, VectorIdx::MAX_INDEX), + | MemoryKind::CallerLocation => (VTimestamp::ZERO, VectorIdx::MAX_INDEX), }; VClockAlloc { alloc_ranges: RefCell::new(RangeMap::new( @@ -752,7 +744,7 @@ impl VClockAlloc { let idx = l_remainder_slice .iter() .enumerate() - .find_map(|(idx, &r)| if r == VTimestamp::NONE { None } else { Some(idx) }) + .find_map(|(idx, &r)| if r == VTimestamp::ZERO { None } else { Some(idx) }) .expect("Invalid VClock Invariant"); Some(idx + r_slice.len()) } else { @@ -1132,6 +1124,7 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> { // Perform the atomic operation. data_race.maybe_perform_sync_operation( &this.machine.threads, + current_span, |index, mut clocks| { for (offset, range) in alloc_meta.alloc_ranges.borrow_mut().iter_mut(base_offset, size) @@ -1153,7 +1146,6 @@ trait EvalContextPrivExt<'mir, 'tcx: 'mir>: MiriInterpCxExt<'mir, 'tcx> { // This conservatively assumes all operations have release semantics Ok(true) }, - current_span, )?; // Log changes to atomic memory. @@ -1497,8 +1489,8 @@ impl GlobalState { fn maybe_perform_sync_operation<'tcx>( &self, thread_mgr: &ThreadManager<'_, '_>, - op: impl FnOnce(VectorIdx, RefMut<'_, ThreadClockSet>) -> InterpResult<'tcx, bool>, current_span: Span, + op: impl FnOnce(VectorIdx, RefMut<'_, ThreadClockSet>) -> InterpResult<'tcx, bool>, ) -> InterpResult<'tcx> { if self.multi_threaded.get() { let (index, clocks) = self.current_thread_state_mut(thread_mgr); diff --git a/src/tools/miri/src/concurrency/vector_clock.rs b/src/tools/miri/src/concurrency/vector_clock.rs index d6d8e1c4b3a..ab4764dd1c8 100644 --- a/src/tools/miri/src/concurrency/vector_clock.rs +++ b/src/tools/miri/src/concurrency/vector_clock.rs @@ -48,14 +48,14 @@ const SMALL_VECTOR: usize = 4; /// The time-stamps recorded in the data-race detector consist of both /// a 32-bit unsigned integer which is the actual timestamp, and a `Span` /// so that diagnostics can report what code was responsible for an operation. -#[derive(Clone, Copy, Debug, Eq)] +#[derive(Clone, Copy, Debug)] pub struct VTimestamp { time: u32, pub span: Span, } impl VTimestamp { - pub const NONE: VTimestamp = VTimestamp { time: 0, span: DUMMY_SP }; + pub const ZERO: VTimestamp = VTimestamp { time: 0, span: DUMMY_SP }; pub fn span_data(&self) -> SpanData { self.span.data() @@ -68,6 +68,8 @@ impl PartialEq for VTimestamp { } } +impl Eq for VTimestamp {} + impl PartialOrd for VTimestamp { fn partial_cmp(&self, other: &Self) -> Option<Ordering> { Some(self.cmp(other)) @@ -98,7 +100,7 @@ impl VClock { /// for a value at the given index pub fn new_with_index(index: VectorIdx, timestamp: VTimestamp) -> VClock { let len = index.index() + 1; - let mut vec = smallvec::smallvec![VTimestamp::NONE; len]; + let mut vec = smallvec::smallvec![VTimestamp::ZERO; len]; vec[index.index()] = timestamp; VClock(vec) } @@ -115,7 +117,7 @@ impl VClock { #[inline] fn get_mut_with_min_len(&mut self, min_len: usize) -> &mut [VTimestamp] { if self.0.len() < min_len { - self.0.resize(min_len, VTimestamp::NONE); + self.0.resize(min_len, VTimestamp::ZERO); } assert!(self.0.len() >= min_len); self.0.as_mut_slice() @@ -361,7 +363,7 @@ impl Index<VectorIdx> for VClock { #[inline] fn index(&self, index: VectorIdx) -> &VTimestamp { - self.as_slice().get(index.to_u32() as usize).unwrap_or(&VTimestamp::NONE) + self.as_slice().get(index.to_u32() as usize).unwrap_or(&VTimestamp::ZERO) } } diff --git a/src/tools/miri/src/concurrency/weak_memory.rs b/src/tools/miri/src/concurrency/weak_memory.rs index c02ec7ded75..2a48c9e6cd0 100644 --- a/src/tools/miri/src/concurrency/weak_memory.rs +++ b/src/tools/miri/src/concurrency/weak_memory.rs @@ -258,7 +258,7 @@ impl<'mir, 'tcx: 'mir> StoreBuffer { // The thread index and timestamp of the initialisation write // are never meaningfully used, so it's fine to leave them as 0 store_index: VectorIdx::from(0), - timestamp: VTimestamp::NONE, + timestamp: VTimestamp::ZERO, val: init, is_seqcst: false, load_info: RefCell::new(LoadInfo::default()), diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index d9f40b55cd6..66cdd331f9f 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -69,8 +69,8 @@ impl fmt::Display for TerminationInfo { DataRace { ptr, op1, op2 } => write!( f, - "Data race detected between {} on {} and {} on {} at {:?}", - op1.action, op1.thread_info, op2.action, op2.thread_info, ptr, + "Data race detected between {} on {} and {} on {} at {:?}. The {} is here", + op1.action, op1.thread_info, op2.action, op2.thread_info, ptr, op1.action ), } } @@ -222,10 +222,9 @@ pub fn report_error<'tcx, 'mir>( vec![(Some(*span), format!("the `{link_name}` symbol is defined here"))], Int2PtrWithStrictProvenance => vec![(None, format!("use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead"))], - DataRace { ptr: _, op1, op2 } => + DataRace { op2, .. } => vec![ - (Some(op1.span), format!("The {} on {} is here", op1.action, op1.thread_info)), - (Some(op2.span), format!("The {} on {} is here", op2.action, op2.thread_info)), + (Some(op2.span), format!("and {} on {}, which is here", op2.action, op2.thread_info)), (None, format!("this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior")), (None, format!("see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information")), ], diff --git a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr index 510b177fc7e..ff79f07ba87 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/alloc_read_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/alloc_read_race.rs:LL:CC - | -LL | ... *pointer.load(Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Allocate on thread `<unnamed>` is here +help: and Allocate on thread `<unnamed>`, which is here --> $DIR/alloc_read_race.rs:LL:CC | LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relaxed); diff --git a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr index 11493536808..2398cbf12e4 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/alloc_write_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) = 2; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/alloc_write_race.rs:LL:CC - | -LL | ... *pointer.load(Ordering::Relaxed) = 2; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Allocate on thread `<unnamed>` is here +help: and Allocate on thread `<unnamed>`, which is here --> $DIR/alloc_write_race.rs:LL:CC | LL | .store(Box::into_raw(Box::<usize>::new_uninit()) as *mut usize, Ordering::Relaxed); diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr index e77afe7b827..15cfaef11cb 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Load is here --> $DIR/atomic_read_na_write_race1.rs:LL:CC | LL | (&*c.0).load(Ordering::SeqCst) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Load is here | -help: The Atomic Load on thread `<unnamed>` is here - --> $DIR/atomic_read_na_write_race1.rs:LL:CC - | -LL | ... (&*c.0).load(Ordering::SeqCst) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/atomic_read_na_write_race1.rs:LL:CC | LL | *(c.0 as *mut usize) = 32; diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr index 6b304421697..d4989146577 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/atomic_read_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/atomic_read_na_write_race2.rs:LL:CC - | -LL | ... *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Atomic Load on thread `<unnamed>` is here +help: and Atomic Load on thread `<unnamed>`, which is here --> $DIR/atomic_read_na_write_race2.rs:LL:CC | LL | atomic_ref.load(Ordering::SeqCst) diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr index ffc985c04cb..5378ea60672 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/atomic_write_na_read_race1.rs:LL:CC | LL | *atomic_ref.get_mut() - | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/atomic_write_na_read_race1.rs:LL:CC - | -LL | *atomic_ref.get_mut() - | ^^^^^^^^^^^^^^^^^^^^^ -help: The Atomic Store on thread `<unnamed>` is here +help: and Atomic Store on thread `<unnamed>`, which is here --> $DIR/atomic_write_na_read_race1.rs:LL:CC | LL | atomic_ref.store(32, Ordering::SeqCst) diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr index 5b5c8d07f8b..3da2f624bfc 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Atomic Store is here --> $DIR/atomic_write_na_read_race2.rs:LL:CC | LL | (&*c.0).store(32, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Atomic Store is here | -help: The Atomic Store on thread `<unnamed>` is here - --> $DIR/atomic_write_na_read_race2.rs:LL:CC - | -LL | ... (&*c.0).store(32, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Read on thread `<unnamed>` is here +help: and Read on thread `<unnamed>`, which is here --> $DIR/atomic_write_na_read_race2.rs:LL:CC | LL | let _val = *(c.0 as *mut usize); diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr index 55cc212ec0a..4d1dbc0b846 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Store is here --> $DIR/atomic_write_na_write_race1.rs:LL:CC | LL | (&*c.0).store(64, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Store is here | -help: The Atomic Store on thread `<unnamed>` is here - --> $DIR/atomic_write_na_write_race1.rs:LL:CC - | -LL | ... (&*c.0).store(64, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/atomic_write_na_write_race1.rs:LL:CC | LL | *(c.0 as *mut usize) = 32; diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr index 2b666ef0276..cec68ba159f 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/atomic_write_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/atomic_write_na_write_race2.rs:LL:CC - | -LL | ... *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: The Atomic Store on thread `<unnamed>` is here +help: and Atomic Store on thread `<unnamed>`, which is here --> $DIR/atomic_write_na_write_race2.rs:LL:CC | LL | atomic_ref.store(64, Ordering::SeqCst); diff --git a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr index 156261b3538..7ef38c6706c 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/dangling_thread_async_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/dangling_thread_async_race.rs:LL:CC - | -LL | *c.0 = 64; - | ^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/dangling_thread_async_race.rs:LL:CC | LL | *c.0 = 32; diff --git a/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr index bd0d34929e7..3f556b6a8a8 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/dangling_thread_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `main` is here - --> $DIR/dangling_thread_race.rs:LL:CC - | -LL | *c.0 = 64; - | ^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/dangling_thread_race.rs:LL:CC | LL | *c.0 = 32; diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr index 02a9bb63b5d..af2b2ed3987 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr @@ -1,4 +1,4 @@ -error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here --> $DIR/dealloc_read_race1.rs:LL:CC | LL | / __rust_dealloc( @@ -7,19 +7,9 @@ LL | | ptr.0 as *mut _, LL | | std::mem::size_of::<usize>(), LL | | std::mem::align_of::<usize>(), LL | | ); - | |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC + | |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here | -help: The Deallocate on thread `<unnamed>` is here - --> $DIR/dealloc_read_race1.rs:LL:CC - | -LL | / __rust_dealloc( -LL | | -LL | | ptr.0 as *mut _, -LL | | std::mem::size_of::<usize>(), -LL | | std::mem::align_of::<usize>(), -LL | | ); - | |_____________^ -help: The Read on thread `<unnamed>` is here +help: and Read on thread `<unnamed>`, which is here --> $DIR/dealloc_read_race1.rs:LL:CC | LL | let _val = *ptr.0; diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr index 18a30bd5a68..d6b2a8a573f 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here --> $DIR/dealloc_read_race_stack.rs:LL:CC | LL | } - | ^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC + | ^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here | -help: The Deallocate on thread `<unnamed>` is here - --> $DIR/dealloc_read_race_stack.rs:LL:CC - | -LL | } - | ^ -help: The Read on thread `<unnamed>` is here +help: and Read on thread `<unnamed>`, which is here --> $DIR/dealloc_read_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr index 9e59d5a6478..6b235f651af 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr @@ -1,4 +1,4 @@ -error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here --> $DIR/dealloc_write_race1.rs:LL:CC | LL | / __rust_dealloc( @@ -7,19 +7,9 @@ LL | | ptr.0 as *mut _, LL | | std::mem::size_of::<usize>(), LL | | std::mem::align_of::<usize>(), LL | | ); - | |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here | -help: The Deallocate on thread `<unnamed>` is here - --> $DIR/dealloc_write_race1.rs:LL:CC - | -LL | / __rust_dealloc( -LL | | -LL | | ptr.0 as *mut _, -LL | | std::mem::size_of::<usize>(), -LL | | std::mem::align_of::<usize>(), -LL | | ); - | |_____________^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/dealloc_write_race1.rs:LL:CC | LL | *ptr.0 = 2; diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr index 5ac7c2d5a1e..6e20a1aa5e9 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here --> $DIR/dealloc_write_race_stack.rs:LL:CC | LL | } - | ^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here | -help: The Deallocate on thread `<unnamed>` is here - --> $DIR/dealloc_write_race_stack.rs:LL:CC - | -LL | } - | ^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/dealloc_write_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) = 3; diff --git a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr index 636a686f84e..70d671ea7b7 100644 --- a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/enable_after_join_to_main.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/enable_after_join_to_main.rs:LL:CC - | -LL | *c.0 = 64; - | ^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/enable_after_join_to_main.rs:LL:CC | LL | *c.0 = 32; diff --git a/src/tools/miri/tests/fail/data_race/fence_after_load.stderr b/src/tools/miri/tests/fail/data_race/fence_after_load.stderr index e6862916384..d073124df00 100644 --- a/src/tools/miri/tests/fail/data_race/fence_after_load.stderr +++ b/src/tools/miri/tests/fail/data_race/fence_after_load.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/fence_after_load.rs:LL:CC | LL | unsafe { V = 2 } - | ^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC + | ^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `main` is here - --> $DIR/fence_after_load.rs:LL:CC - | -LL | unsafe { V = 2 } - | ^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/fence_after_load.rs:LL:CC | LL | unsafe { V = 1 } diff --git a/src/tools/miri/tests/fail/data_race/read_write_race.stderr b/src/tools/miri/tests/fail/data_race/read_write_race.stderr index afba81ee8f7..ae237a9890d 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/read_write_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC + | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/read_write_race.rs:LL:CC - | -LL | *c.0 = 64; - | ^^^^^^^^^ -help: The Read on thread `<unnamed>` is here +help: and Read on thread `<unnamed>`, which is here --> $DIR/read_write_race.rs:LL:CC | LL | let _val = *c.0; diff --git a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr index e1e4604aa6e..ec01d9be6e2 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/read_write_race_stack.rs:LL:CC | LL | stack_var - | ^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/read_write_race_stack.rs:LL:CC - | -LL | stack_var - | ^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/read_write_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) = 3; diff --git a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr index aae90e0c9e9..50768ebcdb9 100644 --- a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr +++ b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/relax_acquire_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/relax_acquire_race.rs:LL:CC - | -LL | *c.0 - | ^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/relax_acquire_race.rs:LL:CC | LL | *c.0 = 1; diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr index 02413e6baa2..c3348ae0a3e 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/release_seq_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/release_seq_race.rs:LL:CC - | -LL | *c.0 - | ^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/release_seq_race.rs:LL:CC | LL | *c.0 = 1; diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr index 9573ca95867..522226faa40 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/release_seq_race_same_thread.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/release_seq_race_same_thread.rs:LL:CC - | -LL | *c.0 - | ^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/release_seq_race_same_thread.rs:LL:CC | LL | *c.0 = 1; diff --git a/src/tools/miri/tests/fail/data_race/rmw_race.stderr b/src/tools/miri/tests/fail/data_race/rmw_race.stderr index ae53cc0c75f..672f08c4221 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/tests/fail/data_race/rmw_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here --> $DIR/rmw_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here | -help: The Read on thread `<unnamed>` is here - --> $DIR/rmw_race.rs:LL:CC - | -LL | *c.0 - | ^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/rmw_race.rs:LL:CC | LL | *c.0 = 1; diff --git a/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr b/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr index 0853e0830c7..e21fe201d1d 100644 --- a/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr +++ b/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here --> $DIR/stack_pop_race.rs:LL:CC | LL | } - | ^ Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC + | ^ Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here | -help: The Deallocate on thread `main` is here - --> $DIR/stack_pop_race.rs:LL:CC - | -LL | } - | ^ -help: The Read on thread `<unnamed>` is here +help: and Read on thread `<unnamed>`, which is here --> $DIR/stack_pop_race.rs:LL:CC | LL | let _val = unsafe { *ptr.0 }; diff --git a/src/tools/miri/tests/fail/data_race/write_write_race.stderr b/src/tools/miri/tests/fail/data_race/write_write_race.stderr index 132cd503044..1f67303e596 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/write_write_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/write_write_race.rs:LL:CC - | -LL | *c.0 = 64; - | ^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/write_write_race.rs:LL:CC | LL | *c.0 = 32; diff --git a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr index 25963d63db5..5b6481327ce 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/write_write_race_stack.rs:LL:CC | LL | stack_var = 1usize; - | ^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/write_write_race_stack.rs:LL:CC - | -LL | stack_var = 1usize; - | ^^^^^^^^^^^^^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/write_write_race_stack.rs:LL:CC | LL | *pointer.load(Ordering::Acquire) = 3; diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr index ff874bd9e82..6f9ea26c088 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/retag_data_race_read.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC + | ^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/retag_data_race_read.rs:LL:CC - | -LL | *p = 5; - | ^^^^^^ -help: The Read on thread `<unnamed>` is here +help: and Read on thread `<unnamed>`, which is here --> $DIR/retag_data_race_read.rs:LL:CC | LL | let _r = &*p; diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.stderr index 80b6ac6e139..44f17bd6ffa 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.stderr @@ -1,15 +1,10 @@ -error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC +error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here --> $DIR/retag_data_race_write.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC + | ^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here | -help: The Write on thread `<unnamed>` is here - --> $DIR/retag_data_race_write.rs:LL:CC - | -LL | *p = 5; - | ^^^^^^ -help: The Write on thread `<unnamed>` is here +help: and Write on thread `<unnamed>`, which is here --> $DIR/retag_data_race_write.rs:LL:CC | LL | let _r = &mut *p; |
