From f4165be780904e52569c30b49fb6c5bcd0930261 Mon Sep 17 00:00:00 2001 From: Ben Kimock Date: Thu, 22 Dec 2022 14:24:10 -0500 Subject: [PATCH] Add a (1) and (2) to the data race errors --- src/tools/miri/src/diagnostics.rs | 6 +++--- src/tools/miri/tests/fail/data_race/alloc_read_race.rs | 2 +- src/tools/miri/tests/fail/data_race/alloc_read_race.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/alloc_write_race.rs | 2 +- src/tools/miri/tests/fail/data_race/alloc_write_race.stderr | 6 +++--- .../miri/tests/fail/data_race/atomic_read_na_write_race1.rs | 2 +- .../tests/fail/data_race/atomic_read_na_write_race1.stderr | 6 +++--- .../miri/tests/fail/data_race/atomic_read_na_write_race2.rs | 2 +- .../tests/fail/data_race/atomic_read_na_write_race2.stderr | 6 +++--- .../miri/tests/fail/data_race/atomic_write_na_read_race1.rs | 2 +- .../tests/fail/data_race/atomic_write_na_read_race1.stderr | 6 +++--- .../miri/tests/fail/data_race/atomic_write_na_read_race2.rs | 2 +- .../tests/fail/data_race/atomic_write_na_read_race2.stderr | 6 +++--- .../tests/fail/data_race/atomic_write_na_write_race1.rs | 2 +- .../tests/fail/data_race/atomic_write_na_write_race1.stderr | 6 +++--- .../tests/fail/data_race/atomic_write_na_write_race2.rs | 2 +- .../tests/fail/data_race/atomic_write_na_write_race2.stderr | 6 +++--- .../miri/tests/fail/data_race/dangling_thread_async_race.rs | 2 +- .../tests/fail/data_race/dangling_thread_async_race.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/dangling_thread_race.rs | 2 +- .../miri/tests/fail/data_race/dangling_thread_race.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/dealloc_read_race1.rs | 2 +- .../miri/tests/fail/data_race/dealloc_read_race1.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/dealloc_read_race2.rs | 2 +- .../miri/tests/fail/data_race/dealloc_read_race_stack.rs | 2 +- .../tests/fail/data_race/dealloc_read_race_stack.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/dealloc_write_race1.rs | 2 +- .../miri/tests/fail/data_race/dealloc_write_race1.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/dealloc_write_race2.rs | 2 +- .../miri/tests/fail/data_race/dealloc_write_race_stack.rs | 2 +- .../tests/fail/data_race/dealloc_write_race_stack.stderr | 6 +++--- .../miri/tests/fail/data_race/enable_after_join_to_main.rs | 2 +- .../tests/fail/data_race/enable_after_join_to_main.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/fence_after_load.rs | 2 +- src/tools/miri/tests/fail/data_race/fence_after_load.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/read_write_race.rs | 2 +- src/tools/miri/tests/fail/data_race/read_write_race.stderr | 6 +++--- .../miri/tests/fail/data_race/read_write_race_stack.rs | 2 +- .../miri/tests/fail/data_race/read_write_race_stack.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/relax_acquire_race.rs | 2 +- .../miri/tests/fail/data_race/relax_acquire_race.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/release_seq_race.rs | 2 +- src/tools/miri/tests/fail/data_race/release_seq_race.stderr | 6 +++--- .../tests/fail/data_race/release_seq_race_same_thread.rs | 2 +- .../fail/data_race/release_seq_race_same_thread.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/rmw_race.rs | 2 +- src/tools/miri/tests/fail/data_race/rmw_race.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/stack_pop_race.rs | 2 +- src/tools/miri/tests/fail/data_race/stack_pop_race.stderr | 6 +++--- src/tools/miri/tests/fail/data_race/write_write_race.rs | 2 +- src/tools/miri/tests/fail/data_race/write_write_race.stderr | 6 +++--- .../miri/tests/fail/data_race/write_write_race_stack.rs | 2 +- .../miri/tests/fail/data_race/write_write_race_stack.stderr | 6 +++--- .../miri/tests/fail/stacked_borrows/retag_data_race_read.rs | 2 +- .../tests/fail/stacked_borrows/retag_data_race_read.stderr | 6 +++--- .../tests/fail/stacked_borrows/retag_data_race_write.rs | 2 +- .../tests/fail/stacked_borrows/retag_data_race_write.stderr | 6 +++--- 57 files changed, 113 insertions(+), 113 deletions(-) diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 9f7be0f3b58e..6f94d57bcc03 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 {:?}. The {} is here", - op1.action, op1.thread_info, op2.action, op2.thread_info, ptr, op1.action + "Data race detected between (1) {} on {} and (2) {} on {} at {ptr:?}. (1) just happened here", + op1.action, op1.thread_info, op2.action, op2.thread_info ), } } @@ -224,7 +224,7 @@ pub fn report_error<'tcx, 'mir>( 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, .. } => vec![ - (Some(op2.span), format!("and the {} on {} is here", op2.action, op2.thread_info)), + (Some(op2.span), format!("and (2) 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 6040452a166c..ba1d54e36c37 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 Read on thread `` and Allocate on thread `` + *pointer.load(Ordering::Relaxed) //~ ERROR: Data race detected between (1) Read on thread `` and (2) Allocate 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 9b487daccad0..38b1ad3cfef3 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 Read on thread `` and Allocate on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here --> $DIR/alloc_read_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `` and Allocate on thread `` at ALLOC. The Read is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here | -help: and the Allocate on thread `` is here +help: and (2) 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 51d431b36f3a..9f85fb13ab3f 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 Write on thread `` and Allocate on thread `` + *pointer.load(Ordering::Relaxed) = 2; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Allocate 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 7b1fcdf05b7f..473a69452268 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 Write on thread `` and Allocate on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here --> $DIR/alloc_write_race.rs:LL:CC | LL | *pointer.load(Ordering::Relaxed) = 2; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `` and Allocate on thread `` at ALLOC. The Write is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Allocate on thread `` at ALLOC. (1) just happened here | -help: and the Allocate on thread `` is here +help: and (2) 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 79c6760b7c42..4aa96de877ad 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 Atomic Load on thread `` and Write on thread `` + (&*c.0).load(Ordering::SeqCst) //~ 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_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr index a66f73bf57dc..565fba328085 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 Atomic Load on thread `` and Write on thread `` at ALLOC. The Atomic Load is here +error: Undefined Behavior: Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/atomic_read_na_write_race1.rs:LL:CC | LL | (&*c.0).load(Ordering::SeqCst) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on thread `` and Write on thread `` at ALLOC. The Atomic Load is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Load on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 e069ac4ad6a8..135017d35b4b 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 Write on thread `` and Atomic Load on thread `` + *atomic_ref.get_mut() = 32; //~ 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_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr index 776ca8bc4d40..753a2961b49f 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 Write on thread `` and Atomic Load on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` at ALLOC. (1) just happened here --> $DIR/atomic_read_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `` and Atomic Load on thread `` at ALLOC. The Write is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Atomic Load on thread `` at ALLOC. (1) just happened here | -help: and the Atomic Load on thread `` is here +help: and (2) 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 9c025a0153d5..345b53ab5cda 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 Read on thread `` and Atomic Store on thread `` + *atomic_ref.get_mut() //~ 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_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr index a59b44909417..5be597b7f566 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 Read on thread `` and Atomic Store on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here --> $DIR/atomic_write_na_read_race1.rs:LL:CC | LL | *atomic_ref.get_mut() - | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `` and Atomic Store on thread `` at ALLOC. The Read is here + | ^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here | -help: and the Atomic Store on thread `` is here +help: and (2) 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 30b3c4863740..bc37f6442eaa 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 Atomic Store on thread `` and Read on thread `` + (&*c.0).store(32, Ordering::SeqCst); //~ 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_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr index 5fb0821e5401..2c21337029ac 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 Atomic Store on thread `` and Read on thread `` at ALLOC. The Atomic Store is here +error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` at ALLOC. (1) just happened 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 `` and Read on thread `` at ALLOC. The Atomic Store is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here | -help: and the Read on thread `` is here +help: and (2) 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 02b17cc57b61..f1647ce4a9d7 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 Atomic Store on thread `` and Write on thread `` + (&*c.0).store(64, Ordering::SeqCst); //~ 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_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr index ec4e2da26bfd..b10724aa67e7 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 Atomic Store on thread `` and Write on thread `` at ALLOC. The Atomic Store is here +error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` at ALLOC. (1) just happened 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 `` and Write on thread `` at ALLOC. The Atomic Store is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 b5f4966d8842..343b46ea4eb5 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 Write on thread `` and Atomic Store on thread `` + *atomic_ref.get_mut() = 32; //~ 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_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr index d532ce4db67f..63393a2a8bd2 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 Write on thread `` and Atomic Store on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here --> $DIR/atomic_write_na_write_race2.rs:LL:CC | LL | *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `` and Atomic Store on thread `` at ALLOC. The Write is here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Atomic Store on thread `` at ALLOC. (1) just happened here | -help: and the Atomic Store on thread `` is here +help: and (2) 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.rs b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.rs index 9922468e5f84..eecb980e9050 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.rs +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.rs @@ -34,7 +34,7 @@ fn main() { let join2 = unsafe { spawn(move || { - *c.0 = 64; //~ ERROR: Data race detected between Write on thread `` and Write on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `` }) }; 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 0eb51d7c95ee..26ab3c16735e 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 Write on thread `` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/dangling_thread_async_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `` and Write on thread `` at ALLOC. The Write is here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 8c8a6ac87f3a..3ead4eedd7f8 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 Write on thread `main` and Write on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `main` and (2) Write on thread `` } } 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 bd1de464ea60..23ccb33e9a9a 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 Write on thread `main` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/dangling_thread_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `main` and Write on thread `` at ALLOC. The Write is here + | ^^^^^^^^^ Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 8e1216f5bf0a..a94459ca4eb1 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 Deallocate on thread `` and Read on thread `` + //~^ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Read 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 051ba69c9733..baf3f852164c 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 `` and Read on thread `` at ALLOC. The Deallocate is here +error: Undefined Behavior: Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) 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 Deallocate on thread `` and Read on thread `` at ALLOC. The Deallocate is here + | |_____________^ Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here | -help: and the Read on thread `` is here +help: and (2) 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 38f76af9de13..6e6b6af5a6ff 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 Read on thread `` and Deallocate on thread `` + // Also an error of the form: Data race detected between (1) Read on thread `` and (2) Deallocate 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 665e5ce4a170..ee3c66fb1973 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 Deallocate on thread `` and Read on thread `` + } //~ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Read 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 c147f33b9505..94d95d44ac8a 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 Deallocate on thread `` and Read on thread `` at ALLOC. The Deallocate is here +error: Undefined Behavior: Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here --> $DIR/dealloc_read_race_stack.rs:LL:CC | LL | } - | ^ Data race detected between Deallocate on thread `` and Read on thread `` at ALLOC. The Deallocate is here + | ^ Data race detected between (1) Deallocate on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here | -help: and the Read on thread `` is here +help: and (2) 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 b36c6b5ac0e4..041df291ed1b 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 Deallocate on thread `` and Write on thread `` + //~^ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Write 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 de7127526113..cce2701a03c4 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 `` and Write on thread `` at ALLOC. The Deallocate is here +error: Undefined Behavior: Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) 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 Deallocate on thread `` and Write on thread `` at ALLOC. The Deallocate is here + | |_____________^ Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 4af8b904626d..b94fa8a14a2b 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 Write on thread `` and Deallocate on thread `` + // Also an error of the form: Data race detected between (1) Write on thread `` and (2) Deallocate 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 f851ce95785f..78f11c14fb1a 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 Deallocate on thread `` and Write on thread `` + } //~ ERROR: Data race detected between (1) Deallocate on thread `` and (2) Write 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 142c90b0b996..0f60926fb5b4 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 Deallocate on thread `` and Write on thread `` at ALLOC. The Deallocate is here +error: Undefined Behavior: Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/dealloc_write_race_stack.rs:LL:CC | LL | } - | ^ Data race detected between Deallocate on thread `` and Write on thread `` at ALLOC. The Deallocate is here + | ^ Data race detected between (1) Deallocate on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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.rs b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.rs index 27aa16a122f3..3d47b1accb31 100644 --- a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.rs +++ b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.rs @@ -30,7 +30,7 @@ pub fn main() { }); let j2 = spawn(move || { - *c.0 = 64; //~ ERROR: Data race detected between Write on thread `` and Write on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `` }); j1.join().unwrap(); 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 bb791300f562..e608342f8d7c 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 Write on thread `` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/enable_after_join_to_main.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `` and Write on thread `` at ALLOC. The Write is here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 4d436d51f989..8de61d14ac18 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 Write on thread `main` and Write on thread `` + unsafe { V = 2 } //~ERROR: Data race detected between (1) Write on thread `main` and (2) Write on thread `` } 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 c44bc743ab6c..9c1d92d14f8d 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 Write on thread `main` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/fence_after_load.rs:LL:CC | LL | unsafe { V = 2 } - | ^^^^^ Data race detected between Write on thread `main` and Write on thread `` at ALLOC. The Write is here + | ^^^^^ Data race detected between (1) Write on thread `main` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 b26ec6c41427..f18d2da83157 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 Write on thread `` and Read on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read 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 ac08d2d79015..e31bc5fbb4a1 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 Write on thread `` and Read on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here --> $DIR/read_write_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `` and Read on thread `` at ALLOC. The Write is here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here | -help: and the Read on thread `` is here +help: and (2) 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 2fbac173993e..acbe2a09e97f 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 Read on thread `` and Write on thread `` + stack_var //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write 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 996f1ec6fab5..09b704e0631f 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 Read on thread `` and Write on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/read_write_race_stack.rs:LL:CC | LL | stack_var - | ^^^^^^^^^ Data race detected between Read on thread `` and Write on thread `` at ALLOC. The Read is here + | ^^^^^^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 24040a949611..cc49e8a04f2d 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 Read on thread `` and Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write 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 4c3021d24d5a..a996fc350023 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 Read on thread `` and Write on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/relax_acquire_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `` and Write on thread `` at ALLOC. The Read is here + | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 2d7246858e10..ba917cd0dd4e 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 Read on thread `` and Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write 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 ee0853dca645..8b27a1885636 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 Read on thread `` and Write on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/release_seq_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `` and Write on thread `` at ALLOC. The Read is here + | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 0f974e1c56d3..c34f4ebe4242 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 Read on thread `` and Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write 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 8156fa717e71..a3561b1a269e 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 Read on thread `` and Write on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/release_seq_race_same_thread.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `` and Write on thread `` at ALLOC. The Read is here + | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 2d13da30b463..f96ebef284ad 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 Read on thread `` and Write on thread `` + *c.0 //~ ERROR: Data race detected between (1) Read on thread `` and (2) Write 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 c8089cf06d99..9448d9059bfd 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 Read on thread `` and Write on thread `` at ALLOC. The Read is here +error: Undefined Behavior: Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/rmw_race.rs:LL:CC | LL | *c.0 - | ^^^^ Data race detected between Read on thread `` and Write on thread `` at ALLOC. The Read is here + | ^^^^ Data race detected between (1) Read on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 cf5c2ed81cb1..fb3ec5a22bd6 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 Deallocate on thread `main` and Read on thread `` +} //~ERROR: Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `` 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 fb6f4470f808..0e2e20290091 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 Deallocate on thread `main` and Read on thread `` at ALLOC. The Deallocate is here +error: Undefined Behavior: Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `` at ALLOC. (1) just happened here --> $DIR/stack_pop_race.rs:LL:CC | LL | } - | ^ Data race detected between Deallocate on thread `main` and Read on thread `` at ALLOC. The Deallocate is here + | ^ Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `` at ALLOC. (1) just happened here | -help: and the Read on thread `` is here +help: and (2) 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.rs b/src/tools/miri/tests/fail/data_race/write_write_race.rs index 60e9ac2ac6c3..fe02d02f9dce 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race.rs +++ b/src/tools/miri/tests/fail/data_race/write_write_race.rs @@ -19,7 +19,7 @@ pub fn main() { }); let j2 = spawn(move || { - *c.0 = 64; //~ ERROR: Data race detected between Write on thread `` and Write on thread `` + *c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `` }); j1.join().unwrap(); 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 27218cf77dd4..dcc94a9d255a 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 Write on thread `` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/write_write_race.rs:LL:CC | LL | *c.0 = 64; - | ^^^^^^^^^ Data race detected between Write on thread `` and Write on thread `` at ALLOC. The Write is here + | ^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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.rs b/src/tools/miri/tests/fail/data_race/write_write_race_stack.rs index 0a29dc13cba1..c1c1b1fa6e38 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race_stack.rs +++ b/src/tools/miri/tests/fail/data_race/write_write_race_stack.rs @@ -39,7 +39,7 @@ pub fn main() { sleep(Duration::from_millis(200)); - stack_var = 1usize; //~ ERROR: Data race detected between Write on thread `` and Write on thread `` + stack_var = 1usize; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `` // read to silence errors stack_var 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 9f3dcf617013..8b0250593d5f 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 Write on thread `` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/write_write_race_stack.rs:LL:CC | LL | stack_var = 1usize; - | ^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `` and Write on thread `` at ALLOC. The Write is here + | ^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) 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 309d7a22be64..8c97a31c3276 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 Write on thread `` and Read on thread `` + *p = 5; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Read 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 ea2b8c8c0acd..790fd51ec371 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 Write on thread `` and Read on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here --> $DIR/retag_data_race_read.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Data race detected between Write on thread `` and Read on thread `` at ALLOC. The Write is here + | ^^^^^^ Data race detected between (1) Write on thread `` and (2) Read on thread `` at ALLOC. (1) just happened here | -help: and the Read on thread `` is here +help: and (2) 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.rs b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.rs index 9368a0a919eb..c1dded40d3c3 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.rs +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_write.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 Write on thread `` and Write on thread `` + *p = 5; //~ ERROR: Data race detected between (1) Write on thread `` and (2) Write on thread `` } } 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 34170bb0b3e5..c5b8b4c41f50 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 Write on thread `` and Write on thread `` at ALLOC. The Write is here +error: Undefined Behavior: Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here --> $DIR/retag_data_race_write.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Data race detected between Write on thread `` and Write on thread `` at ALLOC. The Write is here + | ^^^^^^ Data race detected between (1) Write on thread `` and (2) Write on thread `` at ALLOC. (1) just happened here | -help: and the Write on thread `` is here +help: and (2) occurred earlier here --> $DIR/retag_data_race_write.rs:LL:CC | LL | let _r = &mut *p;