Fix phrasing

This commit is contained in:
Ben Kimock 2022-12-21 23:21:40 -05:00
parent c2f459ca74
commit a2e09baa32
28 changed files with 28 additions and 28 deletions

View File

@ -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 {} on {}, which is here", op2.action, op2.thread_info)),
(Some(op2.span), format!("and the {} on {} is here", op2.action, op2.thread_info)),
(None, format!("this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior")),
(None, format!("see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information")),
],

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | *pointer.load(Ordering::Relaxed)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Allocate on thread `<unnamed>`, which is here
help: and the Allocate on thread `<unnamed>` is here
--> $DIR/alloc_read_race.rs:LL:CC
|
LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relaxed);

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *pointer.load(Ordering::Relaxed) = 2;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Allocate on thread `<unnamed>`, which is here
help: and the Allocate on thread `<unnamed>` is here
--> $DIR/alloc_write_race.rs:LL:CC
|
LL | .store(Box::into_raw(Box::<usize>::new_uninit()) as *mut usize, Ordering::Relaxed);

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Atomic Load on thread `<un
LL | (&*c.0).load(Ordering::SeqCst)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Load is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/atomic_read_na_write_race1.rs:LL:CC
|
LL | *(c.0 as *mut usize) = 32;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *atomic_ref.get_mut() = 32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Atomic Load on thread `<unnamed>`, which is here
help: and the Atomic Load on thread `<unnamed>` is here
--> $DIR/atomic_read_na_write_race2.rs:LL:CC
|
LL | atomic_ref.load(Ordering::SeqCst)

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | *atomic_ref.get_mut()
| ^^^^^^^^^^^^^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Atomic Store on thread `<unnamed>`, which is here
help: and the Atomic Store on thread `<unnamed>` is here
--> $DIR/atomic_write_na_read_race1.rs:LL:CC
|
LL | atomic_ref.store(32, Ordering::SeqCst)

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Atomic Store on thread `<u
LL | (&*c.0).store(32, Ordering::SeqCst);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
help: and Read on thread `<unnamed>`, which is here
help: and the Read on thread `<unnamed>` is here
--> $DIR/atomic_write_na_read_race2.rs:LL:CC
|
LL | let _val = *(c.0 as *mut usize);

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Atomic Store on thread `<u
LL | (&*c.0).store(64, Ordering::SeqCst);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/atomic_write_na_write_race1.rs:LL:CC
|
LL | *(c.0 as *mut usize) = 32;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *atomic_ref.get_mut() = 32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Atomic Store on thread `<unnamed>`, which is here
help: and the Atomic Store on thread `<unnamed>` is here
--> $DIR/atomic_write_na_write_race2.rs:LL:CC
|
LL | atomic_ref.store(64, Ordering::SeqCst);

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *c.0 = 64;
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/dangling_thread_async_race.rs:LL:CC
|
LL | *c.0 = 32;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `main` and
LL | *c.0 = 64;
| ^^^^^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/dangling_thread_race.rs:LL:CC
|
LL | *c.0 = 32;

View File

@ -9,7 +9,7 @@ LL | | std::mem::align_of::<usize>(),
LL | | );
| |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
help: and Read on thread `<unnamed>`, which is here
help: and the Read on thread `<unnamed>` is here
--> $DIR/dealloc_read_race1.rs:LL:CC
|
LL | let _val = *ptr.0;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Deallocate on thread `<unn
LL | }
| ^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
help: and Read on thread `<unnamed>`, which is here
help: and the Read on thread `<unnamed>` is here
--> $DIR/dealloc_read_race_stack.rs:LL:CC
|
LL | *pointer.load(Ordering::Acquire)

View File

@ -9,7 +9,7 @@ LL | | std::mem::align_of::<usize>(),
LL | | );
| |_____________^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/dealloc_write_race1.rs:LL:CC
|
LL | *ptr.0 = 2;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Deallocate on thread `<unn
LL | }
| ^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/dealloc_write_race_stack.rs:LL:CC
|
LL | *pointer.load(Ordering::Acquire) = 3;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *c.0 = 64;
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/enable_after_join_to_main.rs:LL:CC
|
LL | *c.0 = 32;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `main` and
LL | unsafe { V = 2 }
| ^^^^^ Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/fence_after_load.rs:LL:CC
|
LL | unsafe { V = 1 }

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *c.0 = 64;
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Read on thread `<unnamed>`, which is here
help: and the Read on thread `<unnamed>` is here
--> $DIR/read_write_race.rs:LL:CC
|
LL | let _val = *c.0;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | stack_var
| ^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/read_write_race_stack.rs:LL:CC
|
LL | *pointer.load(Ordering::Acquire) = 3;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | *c.0
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/relax_acquire_race.rs:LL:CC
|
LL | *c.0 = 1;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | *c.0
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/release_seq_race.rs:LL:CC
|
LL | *c.0 = 1;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | *c.0
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/release_seq_race_same_thread.rs:LL:CC
|
LL | *c.0 = 1;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Read on thread `<unnamed>`
LL | *c.0
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/rmw_race.rs:LL:CC
|
LL | *c.0 = 1;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Deallocate on thread `main
LL | }
| ^ Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
help: and Read on thread `<unnamed>`, which is here
help: and the Read on thread `<unnamed>` is here
--> $DIR/stack_pop_race.rs:LL:CC
|
LL | let _val = unsafe { *ptr.0 };

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *c.0 = 64;
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/write_write_race.rs:LL:CC
|
LL | *c.0 = 32;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | stack_var = 1usize;
| ^^^^^^^^^^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/write_write_race_stack.rs:LL:CC
|
LL | *pointer.load(Ordering::Acquire) = 3;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *p = 5;
| ^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Read on thread `<unnamed>`, which is here
help: and the Read on thread `<unnamed>` is here
--> $DIR/retag_data_race_read.rs:LL:CC
|
LL | let _r = &*p;

View File

@ -4,7 +4,7 @@ error: Undefined Behavior: Data race detected between Write on thread `<unnamed>
LL | *p = 5;
| ^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
help: and Write on thread `<unnamed>`, which is here
help: and the Write on thread `<unnamed>` is here
--> $DIR/retag_data_race_write.rs:LL:CC
|
LL | let _r = &mut *p;