diff --git a/src/tools/miri/src/concurrency/data_race.rs b/src/tools/miri/src/concurrency/data_race.rs index 5dcaebadc42f6..9646327966896 100644 --- a/src/tools/miri/src/concurrency/data_race.rs +++ b/src/tools/miri/src/concurrency/data_race.rs @@ -811,15 +811,15 @@ impl VClockAlloc { Err(err_machine_stop!(TerminationInfo::DataRace { ptr: ptr_dbg, op1: RacingOp { - action: action.to_string(), - thread_info: current_thread_info, - span: current_clocks.clock.as_slice()[current_index.index()].span_data(), - }, - op2: RacingOp { action: other_action.to_string(), thread_info: other_thread_info, span: other_clock.as_slice()[other_thread.index()].span_data(), }, + op2: RacingOp { + action: action.to_string(), + thread_info: current_thread_info, + span: current_clocks.clock.as_slice()[current_index.index()].span_data(), + }, }))? } diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 2087d0cb548fd..035c0e6423381 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -69,7 +69,7 @@ impl fmt::Display for TerminationInfo { DataRace { ptr, op1, op2 } => write!( f, - "Data race detected between (1) {} on {} and (2) {} on {} at {ptr:?}. (1) just happened here", + "Data race detected between (1) {} on {} and (2) {} on {} at {ptr:?}. (2) just happened here", op1.action, op1.thread_info, op2.action, op2.thread_info ), } @@ -222,9 +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 { op2, .. } => + DataRace { op1, .. } => vec![ - (Some(op2.span), format!("and (2) occurred earlier here")), + (Some(op1.span), format!("and (1) occurred earlier here")), (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.rs b/src/tools/miri/tests/fail/data_race/alloc_read_race.rs index ba1d54e36c372..2698c63a44563 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_read_race.rs +++ b/src/tools/miri/tests/fail/data_race/alloc_read_race.rs @@ -37,7 +37,7 @@ pub fn main() { let pointer = &*ptr.0; // Note: could also error due to reading uninitialized memory, but the data-race detector triggers first. - *pointer.load(Ordering::Relaxed) //~ ERROR: Data race detected between (1) Read on thread `` and (2) Allocate on thread `` + *pointer.load(Ordering::Relaxed) //~ ERROR: Data race detected between (1) Allocate on thread `` and (2) Read on thread `` }); j1.join().unwrap(); 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 59b3802416103..5b809722c7095 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Allocate on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/alloc_read_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Allocate on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/alloc_write_race.rs index 9f85fb13ab3f3..b78d5ef27d39f 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_write_race.rs +++ b/src/tools/miri/tests/fail/data_race/alloc_write_race.rs @@ -35,7 +35,7 @@ pub fn main() { let j2 = spawn(move || { let pointer = &*ptr.0; - *pointer.load(Ordering::Relaxed) = 2; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Allocate on thread `` + *pointer.load(Ordering::Relaxed) = 2; //~ ERROR: Data race detected between (1) Allocate on thread `` and (2) Write on thread `` }); j1.join().unwrap(); 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 0564e4b5bf508..8520bcf4e4ee1 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Allocate on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/alloc_write_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) = 2; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Allocate on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier here --> $DIR/alloc_write_race.rs:LL:CC | LL | .store(Box::into_raw(Box::::new_uninit()) as *mut usize, Ordering::Relaxed); diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.rs b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.rs index 4aa96de877adc..3f811d0f64d04 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.rs +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.rs @@ -20,7 +20,7 @@ pub fn main() { }); let j2 = spawn(move || { - (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` + (&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` }); j1.join().unwrap(); 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 ab7a6178102d5..e25629e14eada 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` at ALLOC. (2) just happened here --> $DIR/atomic_read_na_write_race1.rs:LL:CC | LL | (&*c.0).load(Ordering::SeqCst) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.rs index 135017d35b4ba..34fb3ac066f5f 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.rs +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.rs @@ -23,7 +23,7 @@ pub fn main() { let j2 = spawn(move || { let atomic_ref = &mut *c.0; - *atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` + *atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` }); j1.join().unwrap(); 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 cd8e095a6e2cd..6953b1403b4b5 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/atomic_read_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.rs index 345b53ab5cdae..63b0806f3bb24 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.rs +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.rs @@ -23,7 +23,7 @@ pub fn main() { let j2 = spawn(move || { let atomic_ref = &mut *c.0; - *atomic_ref.get_mut() //~ ERROR: Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` + *atomic_ref.get_mut() //~ ERROR: Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` }); j1.join().unwrap(); 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 b339e5adf8f8a..e52b8895a6af6 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/atomic_write_na_read_race1.rs:LL:CC | LL | *atomic_ref.get_mut() - | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.rs index bc37f6442eaaa..9092254be2164 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.rs +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.rs @@ -20,7 +20,7 @@ pub fn main() { }); let j2 = spawn(move || { - (&*c.0).store(32, Ordering::SeqCst); //~ ERROR: Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` + (&*c.0).store(32, Ordering::SeqCst); //~ ERROR: Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` }); j1.join().unwrap(); 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 39686203491c0..513d13b0349a0 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` at ALLOC. (2) just happened here --> $DIR/atomic_write_na_read_race2.rs:LL:CC | LL | (&*c.0).store(32, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.rs index f1647ce4a9d73..5a713905f4edc 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.rs +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.rs @@ -20,7 +20,7 @@ pub fn main() { }); let j2 = spawn(move || { - (&*c.0).store(64, Ordering::SeqCst); //~ ERROR: Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` + (&*c.0).store(64, Ordering::SeqCst); //~ ERROR: Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` }); j1.join().unwrap(); 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 fd360797d344c..2ff70ef1f6d73 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` at ALLOC. (2) just happened here --> $DIR/atomic_write_na_write_race1.rs:LL:CC | LL | (&*c.0).store(64, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.rs index 343b46ea4eb5f..5848aa262b3eb 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.rs +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.rs @@ -23,7 +23,7 @@ pub fn main() { let j2 = spawn(move || { let atomic_ref = &mut *c.0; - *atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` + *atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` }); j1.join().unwrap(); 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 4e2494cf57b83..166b4d2269a88 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/atomic_write_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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 aba051a2b63e2..a08b21ab0e4ab 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/dangling_thread_async_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/dangling_thread_race.rs index 3ead4eedd7f8d..4c7fbdd7fe6e1 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_race.rs +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_race.rs @@ -33,6 +33,6 @@ fn main() { spawn(|| ()).join().unwrap(); unsafe { - *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `main` and (2) Write on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `main` } } 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 dc35ccf3545f3..aa2e6a6f71265 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `main` at ALLOC. (2) just happened here --> $DIR/dangling_thread_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `main` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.rs index a94459ca4eb19..18593cf56ae56 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.rs +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.rs @@ -25,7 +25,7 @@ pub fn main() { let j2 = spawn(move || { __rust_dealloc( - //~^ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` + //~^ ERROR: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` ptr.0 as *mut _, std::mem::size_of::(), std::mem::align_of::(), 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 fbeab37e17f66..5e546646479d2 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 (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here --> $DIR/dealloc_read_race1.rs:LL:CC | LL | / __rust_dealloc( @@ -7,9 +7,9 @@ LL | | ptr.0 as *mut _, LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ); - | |_____________^ Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here + | |_____________^ Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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_race2.rs b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.rs index 6e6b6af5a6ff0..a6f83d489e587 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.rs +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.rs @@ -28,7 +28,7 @@ pub fn main() { }); let j2 = spawn(move || { - // Also an error of the form: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` + // Also an error of the form: Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` // but the invalid allocation is detected first. *ptr.0 //~ ERROR: dereferenced after this allocation got freed }); diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.rs b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.rs index ee3c66fb1973f..c82bfed09ee51 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.rs +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.rs @@ -35,7 +35,7 @@ pub fn main() { sleep(Duration::from_millis(200)); // Now `stack_var` gets deallocated. - } //~ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` + } //~ ERROR: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` }); let j2 = spawn(move || { 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 9ef9bf35ae756..beb70c5a7fa82 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here --> $DIR/dealloc_read_race_stack.rs:LL:CC | LL | } - | ^ Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here + | ^ Data race detected between (1) Read on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.rs index 041df291ed1b2..1e93a6cb0940d 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.rs +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.rs @@ -24,7 +24,7 @@ pub fn main() { let j2 = spawn(move || { __rust_dealloc( - //~^ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` + //~^ ERROR: Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` ptr.0 as *mut _, std::mem::size_of::(), std::mem::align_of::(), 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 75a98cc5d7d9b..cc4c4524ba25d 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 (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here --> $DIR/dealloc_write_race1.rs:LL:CC | LL | / __rust_dealloc( @@ -7,9 +7,9 @@ LL | | ptr.0 as *mut _, LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ); - | |_____________^ Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | |_____________^ Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier here --> $DIR/dealloc_write_race1.rs:LL:CC | LL | *ptr.0 = 2; diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs index b94fa8a14a2b4..385584db27f92 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs @@ -27,7 +27,7 @@ pub fn main() { }); let j2 = spawn(move || { - // Also an error of the form: Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` + // Also an error of the form: Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` // but the invalid allocation is detected first. *ptr.0 = 2; //~ ERROR: dereferenced after this allocation got freed }); diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.rs b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.rs index 78f11c14fb1a9..259fbdc497a2c 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.rs +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.rs @@ -35,7 +35,7 @@ pub fn main() { sleep(Duration::from_millis(200)); // Now `stack_var` gets deallocated. - } //~ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` + } //~ ERROR: Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` }); let j2 = spawn(move || { 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 f2fc338b33f33..5f9f4f9bee423 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here --> $DIR/dealloc_write_race_stack.rs:LL:CC | LL | } - | ^ Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^ Data race detected between (1) Write on thread `` and (2) Deallocate on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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 620cb37859cdf..84d1c0bf7e666 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/enable_after_join_to_main.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/fence_after_load.rs index 8de61d14ac184..0648aa55f4aa4 100644 --- a/src/tools/miri/tests/fail/data_race/fence_after_load.rs +++ b/src/tools/miri/tests/fail/data_race/fence_after_load.rs @@ -20,5 +20,5 @@ fn main() { // The fence is useless, since it did not happen-after the `store` in the other thread. // Hence this is a data race. // Also see https://github.com/rust-lang/miri/issues/2192. - unsafe { V = 2 } //~ERROR: Data race detected between (1) Write on thread `main` and (2) Write on thread `` + unsafe { V = 2 } //~ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `main` } 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 0bd36067d95b9..c30d2354e768d 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `main` at ALLOC. (2) just happened here --> $DIR/fence_after_load.rs:LL:CC | LL | unsafe { V = 2 } - | ^^^^^ Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `main` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/read_write_race.rs index f18d2da831579..d996141db3ef1 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race.rs +++ b/src/tools/miri/tests/fail/data_race/read_write_race.rs @@ -19,7 +19,7 @@ pub fn main() { }); let j2 = spawn(move || { - *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` }); j1.join().unwrap(); 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 0c0d2fa32c32f..13bc5c74ae333 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/read_write_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/read_write_race_stack.rs index acbe2a09e97f6..b4e371f430d2e 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race_stack.rs +++ b/src/tools/miri/tests/fail/data_race/read_write_race_stack.rs @@ -42,7 +42,7 @@ pub fn main() { sleep(Duration::from_millis(200)); - stack_var //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` + stack_var //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` }); let j2 = spawn(move || { 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 e1d0a52d42acd..96fcb49482225 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/read_write_race_stack.rs:LL:CC | LL | stack_var - | ^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/relax_acquire_race.rs index cc49e8a04f2d4..b7226fa626fbf 100644 --- a/src/tools/miri/tests/fail/data_race/relax_acquire_race.rs +++ b/src/tools/miri/tests/fail/data_race/relax_acquire_race.rs @@ -37,7 +37,7 @@ pub fn main() { let j3 = spawn(move || { if SYNC.load(Ordering::Acquire) == 2 { - *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` } else { 0 } 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 fdf0e4917df81..92755f5551d97 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/relax_acquire_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/release_seq_race.rs index ba917cd0dd4e2..dff33a42a1c2b 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race.rs +++ b/src/tools/miri/tests/fail/data_race/release_seq_race.rs @@ -41,7 +41,7 @@ pub fn main() { let j3 = spawn(move || { sleep(Duration::from_millis(500)); if SYNC.load(Ordering::Acquire) == 3 { - *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` } else { 0 } 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 234ce48e76a50..880268730db13 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/release_seq_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.rs index c34f4ebe4242c..f7a523841b812 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.rs +++ b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.rs @@ -37,7 +37,7 @@ pub fn main() { let j2 = spawn(move || { if SYNC.load(Ordering::Acquire) == 2 { - *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` } else { 0 } 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 8e95d3593b09c..386c012ba4e5e 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/release_seq_race_same_thread.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/data_race/rmw_race.rs index f96ebef284ad3..2201362b167f7 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.rs +++ b/src/tools/miri/tests/fail/data_race/rmw_race.rs @@ -38,7 +38,7 @@ pub fn main() { let j3 = spawn(move || { if SYNC.load(Ordering::Acquire) == 3 { - *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` } else { 0 } 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 6252cd5a71f9f..82cb2c4ecbb47 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/tests/fail/data_race/rmw_race.stderr @@ -1,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here --> $DIR/rmw_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier here --> $DIR/rmw_race.rs:LL:CC | LL | *c.0 = 1; diff --git a/src/tools/miri/tests/fail/data_race/stack_pop_race.rs b/src/tools/miri/tests/fail/data_race/stack_pop_race.rs index fb3ec5a22bd6f..dec5ff274ccf9 100644 --- a/src/tools/miri/tests/fail/data_race/stack_pop_race.rs +++ b/src/tools/miri/tests/fail/data_race/stack_pop_race.rs @@ -21,4 +21,4 @@ fn race(local: i32) { // Deallocating the local (when `main` returns) // races with the read in the other thread. // Make sure the error points at this function's end, not just the call site. -} //~ERROR: Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `` +} //~ERROR: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `main` 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 6cb0270b3dac3..71e38c2727e1a 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Deallocate on thread `main` at ALLOC. (2) just happened here --> $DIR/stack_pop_race.rs:LL:CC | LL | } - | ^ Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `` at ALLOC. (1) just happened here + | ^ Data race detected between (1) Read on thread `` and (2) Deallocate on thread `main` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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 e9055932c5591..3b7eb2b800017 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/write_write_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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 d156ece4a1e31..c501ecd11a6d1 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/write_write_race_stack.rs:LL:CC | LL | stack_var = 1usize; - | ^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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.rs b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.rs index 8c97a31c32766..a63cd03366f68 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.rs +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.rs @@ -15,7 +15,7 @@ fn thread_1(p: SendPtr) { fn thread_2(p: SendPtr) { let p = p.0; unsafe { - *p = 5; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read on thread `` + *p = 5; //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write on thread `` } } 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 26607e1a690df..c53a495b5e18b 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/retag_data_race_read.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here + | ^^^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier 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 33839d2647d6f..da5af60067565 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,10 +1,10 @@ -error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here --> $DIR/retag_data_race_write.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here + | ^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (2) just happened here | -help: and (2) occurred earlier here +help: and (1) occurred earlier here --> $DIR/retag_data_race_write.rs:LL:CC | LL | let _r = &mut *p;