Add a (1) and (2) to the data race errors
This commit is contained in:
parent
a2e09baa32
commit
f4165be780
57 changed files with 113 additions and 113 deletions
|
|
@ -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")),
|
||||
],
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Allocate on thread `<unnamed>`
|
||||
*pointer.load(Ordering::Relaxed) //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Allocate on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Allocate on thread `<unnamed>` 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 `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Allocate on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Allocate on thread `<unnamed>` 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);
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Allocate on thread `<unnamed>`
|
||||
*pointer.load(Ordering::Relaxed) = 2; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Allocate on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Allocate on thread `<unnamed>` 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 `<unnamed>` and Allocate on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Allocate on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Allocate on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/alloc_write_race.rs:LL:CC
|
||||
|
|
||||
LL | .store(Box::into_raw(Box::<usize>::new_uninit()) as *mut usize, Ordering::Relaxed);
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
(&*c.0).load(Ordering::SeqCst) //~ ERROR: Data race detected between (1) Atomic Load on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Atomic Load on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Load is here
|
||||
error: Undefined Behavior: Data race detected between (1) Atomic Load on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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 `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Load is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Load on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/atomic_read_na_write_race1.rs:LL:CC
|
||||
|
|
||||
LL | *(c.0 as *mut usize) = 32;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Atomic Load on thread `<unnamed>`
|
||||
*atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Atomic Load on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Atomic Load on thread `<unnamed>` 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 `<unnamed>` and Atomic Load on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Atomic Load on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Atomic Load on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/atomic_read_na_write_race2.rs:LL:CC
|
||||
|
|
||||
LL | atomic_ref.load(Ordering::SeqCst)
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Atomic Store on thread `<unnamed>`
|
||||
*atomic_ref.get_mut() //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Atomic Store on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Atomic Store on thread `<unnamed>` 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 `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Atomic Store on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Atomic Store on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/atomic_write_na_read_race1.rs:LL:CC
|
||||
|
|
||||
LL | atomic_ref.store(32, Ordering::SeqCst)
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Read on thread `<unnamed>`
|
||||
(&*c.0).store(32, Ordering::SeqCst); //~ ERROR: Data race detected between (1) Atomic Store on thread `<unnamed>` and (2) Read on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Atomic Store on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
||||
error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `<unnamed>` and (2) Read on thread `<unnamed>` 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 `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Read on thread `<unnamed>` 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);
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
(&*c.0).store(64, Ordering::SeqCst); //~ ERROR: Data race detected between (1) Atomic Store on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Atomic Store on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
||||
error: Undefined Behavior: Data race detected between (1) Atomic Store on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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 `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Atomic Store is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Atomic Store on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/atomic_write_na_write_race1.rs:LL:CC
|
||||
|
|
||||
LL | *(c.0 as *mut usize) = 32;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Atomic Store on thread `<unnamed>`
|
||||
*atomic_ref.get_mut() = 32; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Atomic Store on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Atomic Store on thread `<unnamed>` 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 `<unnamed>` and Atomic Store on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Atomic Store on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Atomic Store on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/atomic_write_na_write_race2.rs:LL:CC
|
||||
|
|
||||
LL | atomic_ref.store(64, Ordering::SeqCst);
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ fn main() {
|
|||
|
||||
let join2 = unsafe {
|
||||
spawn(move || {
|
||||
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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 `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/dangling_thread_async_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>`
|
||||
*c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `main` and (2) Write on thread `<unnamed>`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `main` and (2) Write on thread `<unnamed>` 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 `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^ Data race detected between (1) Write on thread `main` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/dangling_thread_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ pub fn main() {
|
|||
|
||||
let j2 = spawn(move || {
|
||||
__rust_dealloc(
|
||||
//~^ ERROR: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>`
|
||||
//~^ ERROR: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Read on thread `<unnamed>`
|
||||
ptr.0 as *mut _,
|
||||
std::mem::size_of::<usize>(),
|
||||
std::mem::align_of::<usize>(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
error: Undefined Behavior: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Read on thread `<unnamed>` 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::<usize>(),
|
||||
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
|
||||
| |_____________^ Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/dealloc_read_race1.rs:LL:CC
|
||||
|
|
||||
LL | let _val = *ptr.0;
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ pub fn main() {
|
|||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
// Also an error of the form: Data race detected between Read on thread `<unnamed>` and Deallocate on thread `<unnamed>`
|
||||
// Also an error of the form: Data race detected between (1) Read on thread `<unnamed>` and (2) Deallocate on thread `<unnamed>`
|
||||
// but the invalid allocation is detected first.
|
||||
*ptr.0 //~ ERROR: dereferenced after this allocation got freed
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Read on thread `<unnamed>`
|
||||
} //~ ERROR: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Read on thread `<unnamed>`
|
||||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
error: Undefined Behavior: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/dealloc_read_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | }
|
||||
| ^ Data race detected between Deallocate on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
| ^ Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/dealloc_read_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ pub fn main() {
|
|||
|
||||
let j2 = spawn(move || {
|
||||
__rust_dealloc(
|
||||
//~^ ERROR: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>`
|
||||
//~^ ERROR: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
ptr.0 as *mut _,
|
||||
std::mem::size_of::<usize>(),
|
||||
std::mem::align_of::<usize>(),
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
error: Undefined Behavior: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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::<usize>(),
|
||||
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
|
||||
| |_____________^ Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/dealloc_write_race1.rs:LL:CC
|
||||
|
|
||||
LL | *ptr.0 = 2;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ pub fn main() {
|
|||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
// Also an error of the form: Data race detected between Write on thread `<unnamed>` and Deallocate on thread `<unnamed>`
|
||||
// Also an error of the form: Data race detected between (1) Write on thread `<unnamed>` and (2) Deallocate on thread `<unnamed>`
|
||||
// but the invalid allocation is detected first.
|
||||
*ptr.0 = 2; //~ ERROR: dereferenced after this allocation got freed
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
} //~ ERROR: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
error: Undefined Behavior: Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/dealloc_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | }
|
||||
| ^ Data race detected between Deallocate on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
| ^ Data race detected between (1) Deallocate on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/dealloc_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire) = 3;
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ pub fn main() {
|
|||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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 `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/enable_after_join_to_main.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>`
|
||||
unsafe { V = 2 } //~ERROR: Data race detected between (1) Write on thread `main` and (2) Write on thread `<unnamed>`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `main` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `main` and (2) Write on thread `<unnamed>` 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 `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^ Data race detected between (1) Write on thread `main` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/fence_after_load.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { V = 1 }
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub fn main() {
|
|||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>`
|
||||
*c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Read on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/read_write_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/read_write_race.rs:LL:CC
|
||||
|
|
||||
LL | let _val = *c.0;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ pub fn main() {
|
|||
|
||||
sleep(Duration::from_millis(200));
|
||||
|
||||
stack_var //~ ERROR: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>`
|
||||
stack_var //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/read_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | stack_var
|
||||
| ^^^^^^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^^^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/read_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire) = 3;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/relax_acquire_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/relax_acquire_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/release_seq_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/release_seq_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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 `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/release_seq_race_same_thread.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 //~ ERROR: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
} else {
|
||||
0
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/rmw_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0
|
||||
| ^^^^ Data race detected between Read on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Read is here
|
||||
| ^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/rmw_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 1;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>`
|
||||
} //~ERROR: Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `<unnamed>`
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Deallocate on thread `main` and Read on thread `<unnamed>` at ALLOC. The Deallocate is here
|
||||
error: Undefined Behavior: Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `<unnamed>` 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 `<unnamed>` at ALLOC. The Deallocate is here
|
||||
| ^ Data race detected between (1) Deallocate on thread `main` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/stack_pop_race.rs:LL:CC
|
||||
|
|
||||
LL | let _val = unsafe { *ptr.0 };
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ pub fn main() {
|
|||
});
|
||||
|
||||
let j2 = spawn(move || {
|
||||
*c.0 = 64; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
|
||||
*c.0 = 64; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
});
|
||||
|
||||
j1.join().unwrap();
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/write_write_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 64;
|
||||
| ^^^^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/write_write_race.rs:LL:CC
|
||||
|
|
||||
LL | *c.0 = 32;
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ pub fn main() {
|
|||
|
||||
sleep(Duration::from_millis(200));
|
||||
|
||||
stack_var = 1usize; //~ ERROR: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>`
|
||||
stack_var = 1usize; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
|
||||
// read to silence errors
|
||||
stack_var
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` 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 `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^^^^^^^^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/write_write_race_stack.rs:LL:CC
|
||||
|
|
||||
LL | *pointer.load(Ordering::Acquire) = 3;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Read on thread `<unnamed>`
|
||||
*p = 5; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Read on thread `<unnamed>`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/retag_data_race_read.rs:LL:CC
|
||||
|
|
||||
LL | *p = 5;
|
||||
| ^^^^^^ Data race detected between Write on thread `<unnamed>` and Read on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Read on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Read on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/retag_data_race_read.rs:LL:CC
|
||||
|
|
||||
LL | let _r = &*p;
|
||||
|
|
|
|||
|
|
@ -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 `<unnamed>` and Write on thread `<unnamed>`
|
||||
*p = 5; //~ ERROR: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>`
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
error: Undefined Behavior: Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
error: Undefined Behavior: Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
--> $DIR/retag_data_race_write.rs:LL:CC
|
||||
|
|
||||
LL | *p = 5;
|
||||
| ^^^^^^ Data race detected between Write on thread `<unnamed>` and Write on thread `<unnamed>` at ALLOC. The Write is here
|
||||
| ^^^^^^ Data race detected between (1) Write on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (1) just happened here
|
||||
|
|
||||
help: and the Write on thread `<unnamed>` is here
|
||||
help: and (2) occurred earlier here
|
||||
--> $DIR/retag_data_race_write.rs:LL:CC
|
||||
|
|
||||
LL | let _r = &mut *p;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue