From 6ea98836e86d330740caa3c92616d2eff860b6ed Mon Sep 17 00:00:00 2001 From: actuallyatoaster <7093583+actuallyatoaster@users.noreply.github.com> Date: Sun, 8 Dec 2024 16:54:02 -0800 Subject: [PATCH] Include thread spawn in backtrace --- src/concurrency/thread.rs | 39 +++++++++++--- src/diagnostics.rs | 30 +++++++++++ .../libc_pthread_create_too_few_args.stderr | 2 + .../libc_pthread_create_too_many_args.stderr | 2 + .../concurrency/libc_pthread_join_main.stderr | 16 ++++++ .../libc_pthread_join_multiple.stderr | 14 +++++ .../concurrency/libc_pthread_join_self.stderr | 17 ++++++ .../libc_pthread_mutex_deadlock.stderr | 13 +++++ .../libc_pthread_mutex_wrong_owner.stderr | 13 +++++ ...ibc_pthread_rwlock_read_wrong_owner.stderr | 13 +++++ ..._pthread_rwlock_write_read_deadlock.stderr | 13 +++++ ...pthread_rwlock_write_write_deadlock.stderr | 13 +++++ ...bc_pthread_rwlock_write_wrong_owner.stderr | 13 +++++ .../libc/env-set_var-data-race.stderr | 16 ++++++ .../libc/eventfd_block_read_twice.stderr | 54 +++++++++++++++++++ .../libc/eventfd_block_write_twice.stderr | 54 +++++++++++++++++++ .../libc/libc_epoll_block_two_thread.stderr | 45 ++++++++++++++++ .../retag_data_race_write.stack.stderr | 11 ++++ .../retag_data_race_write.tree.stderr | 11 ++++ tests/fail/data_race/alloc_read_race.stderr | 17 ++++++ tests/fail/data_race/alloc_write_race.stderr | 16 ++++++ .../atomic_read_na_write_race1.stderr | 15 ++++++ .../atomic_read_na_write_race2.stderr | 16 ++++++ .../atomic_write_na_read_race1.stderr | 16 ++++++ .../atomic_write_na_read_race2.stderr | 15 ++++++ .../atomic_write_na_write_race1.stderr | 15 ++++++ .../atomic_write_na_write_race2.stderr | 16 ++++++ .../dangling_thread_async_race.stderr | 14 +++++ .../fail/data_race/dealloc_read_race1.stderr | 18 +++++++ .../fail/data_race/dealloc_read_race2.stderr | 17 ++++++ .../data_race/dealloc_read_race_stack.stderr | 18 +++++++ .../fail/data_race/dealloc_write_race1.stderr | 18 +++++++ .../fail/data_race/dealloc_write_race2.stderr | 17 ++++++ .../data_race/dealloc_write_race_stack.stderr | 18 +++++++ .../enable_after_join_to_main.stderr | 15 ++++++ .../local_variable_alloc_race.stderr | 22 ++++++++ .../data_race/local_variable_read_race.stderr | 18 +++++++ .../local_variable_write_race.stderr | 18 +++++++ ...ze_read_read_write.match_first_load.stderr | 32 +++++++++++ ...e_read_read_write.match_second_load.stderr | 32 +++++++++++ .../mixed_size_read_write.read_write.stderr | 32 +++++++++++ .../mixed_size_read_write.write_read.stderr | 32 +++++++++++ .../mixed_size_write_write.fst.stderr | 30 +++++++++++ .../mixed_size_write_write.snd.stderr | 30 +++++++++++ tests/fail/data_race/read_write_race.stderr | 15 ++++++ .../data_race/read_write_race_stack.stderr | 18 +++++++ .../fail/data_race/relax_acquire_race.stderr | 18 +++++++ tests/fail/data_race/release_seq_race.stderr | 18 +++++++ .../release_seq_race_same_thread.stderr | 18 +++++++ tests/fail/data_race/rmw_race.stderr | 18 +++++++ tests/fail/data_race/write_write_race.stderr | 15 ++++++ .../data_race/write_write_race_stack.stderr | 18 +++++++ .../retag_data_race_protected_read.stderr | 17 ++++++ .../retag_data_race_read.stderr | 11 ++++ .../reservedim_spurious_write.with.stderr | 18 +++++++ .../reservedim_spurious_write.without.stderr | 18 +++++++ tests/fail/tree_borrows/spurious_read.stderr | 23 ++++++++ tests/fail/weak_memory/weak_uninit.stderr | 16 ++++++ 58 files changed, 1129 insertions(+), 8 deletions(-) diff --git a/src/concurrency/thread.rs b/src/concurrency/thread.rs index 59e2fdd428..eaa017b71c 100644 --- a/src/concurrency/thread.rs +++ b/src/concurrency/thread.rs @@ -235,6 +235,9 @@ pub struct Thread<'tcx> { /// The join status. join_status: ThreadJoinStatus, + // ThreadId that spawned this thread and backtrace to where this thread was spawned + thread_spawn_context: Option<(ThreadId, Vec>)>, + /// Stack of active panic payloads for the current thread. Used for storing /// the argument of the call to `miri_start_unwind` (the panic payload) when unwinding. /// This is pointer-sized, and matches the `Payload` type in `src/libpanic_unwind/miri.rs`. @@ -321,13 +324,18 @@ impl<'tcx> std::fmt::Debug for Thread<'tcx> { } impl<'tcx> Thread<'tcx> { - fn new(name: Option<&str>, on_stack_empty: Option>) -> Self { + fn new( + name: Option<&str>, + on_stack_empty: Option>, + thread_spawn_context: Option<(ThreadId, Vec>)>, + ) -> Self { Self { state: ThreadState::Enabled, thread_name: name.map(|name| Vec::from(name.as_bytes())), stack: Vec::new(), top_user_relevant_frame: None, join_status: ThreadJoinStatus::Joinable, + thread_spawn_context, panic_payloads: Vec::new(), last_error: None, on_stack_empty, @@ -345,6 +353,7 @@ impl VisitProvenance for Thread<'_> { state: _, thread_name: _, join_status: _, + thread_spawn_context: _, on_stack_empty: _, // we assume the closure captures no GC-relevant state } = self; @@ -475,7 +484,7 @@ impl<'tcx> Default for ThreadManager<'tcx> { fn default() -> Self { let mut threads = IndexVec::new(); // Create the main thread and add it to the list of threads. - threads.push(Thread::new(Some("main"), None)); + threads.push(Thread::new(Some("main"), None, None)); Self { active_thread: ThreadId::MAIN_THREAD, threads, @@ -542,9 +551,13 @@ impl<'tcx> ThreadManager<'tcx> { } /// Create a new thread and returns its id. - fn create_thread(&mut self, on_stack_empty: StackEmptyCallback<'tcx>) -> ThreadId { + fn create_thread( + &mut self, + on_stack_empty: StackEmptyCallback<'tcx>, + thread_spawn_context: Option<(ThreadId, Vec>)>, + ) -> ThreadId { let new_thread_id = ThreadId::new(self.threads.len()); - self.threads.push(Thread::new(None, Some(on_stack_empty))); + self.threads.push(Thread::new(None, Some(on_stack_empty), thread_spawn_context)); new_thread_id } @@ -711,6 +724,13 @@ impl<'tcx> ThreadManager<'tcx> { self.threads[thread].thread_display_name(thread) } + pub fn get_thread_spawn_context( + &self, + thread: ThreadId, + ) -> Option<&(ThreadId, Vec>)> { + self.threads[thread].thread_spawn_context.as_ref() + } + /// Put the thread into the blocked state. fn block_thread( &mut self, @@ -924,10 +944,13 @@ pub trait EvalContextExt<'tcx>: crate::MiriInterpCxExt<'tcx> { let this = self.eval_context_mut(); // Create the new thread - let new_thread_id = this.machine.threads.create_thread({ - let mut state = tls::TlsDtorsState::default(); - Box::new(move |m| state.on_stack_empty(m)) - }); + let new_thread_id = this.machine.threads.create_thread( + { + let mut state = tls::TlsDtorsState::default(); + Box::new(move |m| state.on_stack_empty(m)) + }, + Some((this.machine.threads.active_thread(), this.generate_stacktrace())), + ); let current_span = this.machine.current_span(); if let Some(data_race) = &mut this.machine.data_race { data_race.thread_created(&this.machine.threads, new_thread_id, current_span); diff --git a/src/diagnostics.rs b/src/diagnostics.rs index 41b7be37c3..dcaf7a6b4c 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -588,6 +588,36 @@ pub fn report_msg<'tcx>( } } + // Traverse thread spawns to display thread backtraces up to main thread + if let Some(mut thread) = thread { + let mut thread_spawn_context = machine.threads.get_thread_spawn_context(thread); + + while let Some((spawning_thread, thread_spawn_backtrace)) = thread_spawn_context { + err.note(format!( + "thread `{}` was spawned by thread `{}`", + machine.threads.get_thread_display_name(thread), + machine.threads.get_thread_display_name(*spawning_thread) + )); + let (pruned_stacktrace, _was_pruned) = + prune_stacktrace(thread_spawn_backtrace.to_vec(), machine); + + for (idx, frame_info) in pruned_stacktrace.iter().enumerate() { + let is_local = machine.is_local(frame_info); + // No span for non-local frames except the first frame (which is the error site). + if is_local && idx > 0 { + err.subdiagnostic(frame_info.as_note(machine.tcx)); + } else { + let sm = sess.source_map(); + let span = sm.span_to_embeddable_string(frame_info.span); + err.note(format!("{frame_info} at {span}")); + } + } + + thread = *spawning_thread; + thread_spawn_context = machine.threads.get_thread_spawn_context(thread); + } + } + err.emit(); } diff --git a/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr b/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr index aa67420c75..6c31bf6143 100644 --- a/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr @@ -5,6 +5,8 @@ error: Undefined Behavior: calling a function with more arguments than it expect = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_create_too_few_args.rs:LL:CC error: aborting due to 1 previous error diff --git a/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr b/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr index 4de947b169..9d3d93797e 100644 --- a/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr @@ -5,6 +5,8 @@ error: Undefined Behavior: calling a function with fewer arguments than it requi = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_create_too_many_args.rs:LL:CC error: aborting due to 1 previous error diff --git a/tests/fail-dep/concurrency/libc_pthread_join_main.stderr b/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index b04a18561f..8cc3d6d9c6 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_main.stderr @@ -8,6 +8,22 @@ LL | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC + | +LL | let handle = thread::spawn(move || { + | __________________^ +LL | | unsafe { +LL | | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); +LL | | } +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr b/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr index 1ada476811..933cf8c5a7 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr @@ -8,6 +8,20 @@ LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC + | +LL | ... let handle = thread::spawn(move || { + | ____________________^ +LL | | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_join_self.stderr b/tests/fail-dep/concurrency/libc_pthread_join_self.stderr index 6aa85086a8..488d4e2f01 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_self.stderr @@ -8,6 +8,23 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC + | +LL | let handle = thread::spawn(|| { + | __________________^ +LL | | unsafe { +LL | | let native: libc::pthread_t = libc::pthread_self(); +LL | | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); +LL | | } +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr index 534cacaed5..c1b07994d6 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -6,6 +6,19 @@ LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _ | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC + | +LL | / thread::spawn(move || { +LL | | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); +LL | | }) + | |__________^ error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index 97c92e828e..ce48533fce 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr @@ -8,6 +8,19 @@ LL | ...t_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC + | +LL | / ... thread::spawn(move || { +LL | | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0); +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr index d2fccfcc3f..90ae429954 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr @@ -8,6 +8,19 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC + | +LL | / ... thread::spawn(move || { +LL | | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0); +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr index ae77d79fcd..4e25874517 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr @@ -6,6 +6,19 @@ LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mu | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC + | +LL | / thread::spawn(move || { +LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); +LL | | }) + | |__________^ error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index 4f46346413..a559c62653 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr @@ -6,6 +6,19 @@ LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mu | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC + | +LL | / thread::spawn(move || { +LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); +LL | | }) + | |__________^ error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC diff --git a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index 906311144e..248ee19fa1 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr @@ -8,6 +8,19 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC + | +LL | / ... thread::spawn(move || { +LL | | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0); +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/env-set_var-data-race.stderr b/tests/fail-dep/libc/env-set_var-data-race.stderr index 904a1677b8..50628f8e13 100644 --- a/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/tests/fail-dep/libc/env-set_var-data-race.stderr @@ -13,6 +13,22 @@ LL | env::set_var("MY_RUST_VAR", "Ferris"); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC + | +LL | let t = thread::spawn(|| unsafe { + | _____________^ +LL | | // Access the environment in another thread without taking the env lock. +LL | | // This represents some C code that queries the environment. +LL | | libc::getenv(b"TZ/0".as_ptr().cast()); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/eventfd_block_read_twice.stderr b/tests/fail-dep/libc/eventfd_block_read_twice.stderr index bb235345c5..7b093da7a5 100644 --- a/tests/fail-dep/libc/eventfd_block_read_twice.stderr +++ b/tests/fail-dep/libc/eventfd_block_read_twice.stderr @@ -19,6 +19,24 @@ error: deadlock: the evaluated program deadlocked = note: the evaluated program deadlocked = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC + | +LL | let thread1 = thread::spawn(move || { + | ___________________^ +LL | | let mut buf: [u8; 8] = [0; 8]; +LL | | // This read will block initially. +LL | | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8).try_into().unwrap() }; +... | +LL | | assert_eq!(counter, 1_u64); +LL | | }); + | |______^ error: deadlock: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC @@ -28,12 +46,48 @@ LL | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8). | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | let mut buf: [u8; 8] = [0; 8]; +LL | | // This read will block initially, then get unblocked by thread3, then get blocked again +LL | | // because the `read` in thread1 executes first and set the counter to 0 again. +... | +LL | | assert_eq!(counter, 1_u64); +LL | | }); + | |______^ error: deadlock: the evaluated program deadlocked | = note: the evaluated program deadlocked = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC + | +LL | let thread3 = thread::spawn(move || { + | ___________________^ +LL | | let sized_8_data = 1_u64.to_ne_bytes(); +LL | | // Write 1 to the counter, so both thread1 and thread2 will unblock. +LL | | let res: i64 = unsafe { +... | +LL | | assert_eq!(res, 8); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/eventfd_block_write_twice.stderr b/tests/fail-dep/libc/eventfd_block_write_twice.stderr index d9163a5748..c0705c08f0 100644 --- a/tests/fail-dep/libc/eventfd_block_write_twice.stderr +++ b/tests/fail-dep/libc/eventfd_block_write_twice.stderr @@ -19,6 +19,24 @@ error: deadlock: the evaluated program deadlocked = note: the evaluated program deadlocked = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC + | +LL | let thread1 = thread::spawn(move || { + | ___________________^ +LL | | let sized_8_data = (u64::MAX - 1).to_ne_bytes(); +LL | | let res: i64 = unsafe { +LL | | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8).try_into().unwrap() +... | +LL | | assert_eq!(res, 8); +LL | | }); + | |______^ error: deadlock: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC @@ -28,12 +46,48 @@ LL | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8 | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | let sized_8_data = (u64::MAX - 1).to_ne_bytes(); +LL | | // Write u64::MAX - 1, so the all subsequent write will block. +LL | | let res: i64 = unsafe { +... | +LL | | assert_eq!(res, 8); +LL | | }); + | |______^ error: deadlock: the evaluated program deadlocked | = note: the evaluated program deadlocked = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC + | +LL | let thread3 = thread::spawn(move || { + | ___________________^ +LL | | let mut buf: [u8; 8] = [0; 8]; +LL | | // This will unblock both `write` in thread1 and thread2. +LL | | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8).try_into().unwrap() }; +... | +LL | | assert_eq!(counter, (u64::MAX - 1)); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr b/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr index b29794f68d..fb94cfa29e 100644 --- a/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr +++ b/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr @@ -3,6 +3,20 @@ error: deadlock: the evaluated program deadlocked = note: the evaluated program deadlocked = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC + | +LL | let thread2 = spawn(move || { + | ___________________^ +LL | | check_epoll_wait::(epfd, &[(expected_event, expected_value)], -1); +LL | | }); + | |______^ error: deadlock: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -28,12 +42,43 @@ LL | check_epoll_wait::(epfd, &[(expected_event, expected_value)], | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC + | +LL | let thread1 = spawn(move || { + | ___________________^ +LL | | check_epoll_wait::(epfd, &[(expected_event, expected_value)], -1); +LL | | +LL | | }); + | |______^ error: deadlock: the evaluated program deadlocked | = note: the evaluated program deadlocked = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC + | +LL | let thread3 = spawn(move || { + | ___________________^ +LL | | let data = "abcde".as_bytes().as_ptr(); +LL | | let res = unsafe { libc::write(fds[1], data as *const libc::c_void, 5) }; +LL | | assert_eq!(res, 5); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/retag_data_race_write.stack.stderr b/tests/fail/both_borrows/retag_data_race_write.stack.stderr index 6bc66f2419..bf2e1eb195 100644 --- a/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -21,6 +21,17 @@ note: inside closure | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | let t2 = std::thread::spawn(move || thread_2(p)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/both_borrows/retag_data_race_write.tree.stderr b/tests/fail/both_borrows/retag_data_race_write.tree.stderr index 510e592539..69e39e2cca 100644 --- a/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -21,6 +21,17 @@ note: inside closure | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/both_borrows/retag_data_race_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | let t2 = std::thread::spawn(move || thread_2(p)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/alloc_read_race.stderr b/tests/fail/data_race/alloc_read_race.stderr index e6ee9ce81f..030c958f50 100644 --- a/tests/fail/data_race/alloc_read_race.stderr +++ b/tests/fail/data_race/alloc_read_race.stderr @@ -13,6 +13,23 @@ LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relax = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/alloc_read_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/alloc_read_race.rs:LL:CC}, std::mem::MaybeUninit>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/alloc_read_race.rs:LL:CC}, std::mem::MaybeUninit>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/alloc_read_race.rs:LL:CC}, std::mem::MaybeUninit>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/alloc_read_race.rs:LL:CC}, std::mem::MaybeUninit>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/alloc_read_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... let pointer = &*ptr.0; +... | +LL | | ... *pointer.load(Ordering::Relaxed) +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/alloc_write_race.stderr b/tests/fail/data_race/alloc_write_race.stderr index 97b54609ad..6e23a97201 100644 --- a/tests/fail/data_race/alloc_write_race.stderr +++ b/tests/fail/data_race/alloc_write_race.stderr @@ -13,6 +13,22 @@ LL | .store(Box::into_raw(Box::::new_uninit()) as *mut us = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/alloc_write_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/alloc_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/alloc_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/alloc_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/alloc_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/alloc_write_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... let pointer = &*ptr.0; +LL | | ... *pointer.load(Ordering::Relaxed) = 2; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_read_na_write_race1.stderr b/tests/fail/data_race/atomic_read_na_write_race1.stderr index d3d6ed2e31..5f274301a6 100644 --- a/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -13,6 +13,21 @@ LL | *(c.0 as *mut usize) = 32; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... (&*c.0).load(Ordering::SeqCst) +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_read_na_write_race2.stderr b/tests/fail/data_race/atomic_read_na_write_race2.stderr index ea535ddac4..3abb382568 100644 --- a/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -13,6 +13,22 @@ LL | atomic_ref.load(Ordering::SeqCst) = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... let atomic_ref = &mut *c.0; +LL | | ... *atomic_ref.get_mut() = 32; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_read_race1.stderr b/tests/fail/data_race/atomic_write_na_read_race1.stderr index fe65eca4bc..cad1b1676b 100644 --- a/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -13,6 +13,22 @@ LL | atomic_ref.store(32, Ordering::SeqCst) = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... let atomic_ref = &mut *c.0; +LL | | ... *atomic_ref.get_mut() +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_read_race2.stderr b/tests/fail/data_race/atomic_write_na_read_race2.stderr index 4393cc3c09..381f0c8e3b 100644 --- a/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -13,6 +13,21 @@ LL | let _val = *(c.0 as *mut usize); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... (&*c.0).store(32, Ordering::SeqCst); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_write_race1.stderr b/tests/fail/data_race/atomic_write_na_write_race1.stderr index 5a7f90447f..efa103da54 100644 --- a/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -13,6 +13,21 @@ LL | *(c.0 as *mut usize) = 32; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... (&*c.0).store(64, Ordering::SeqCst); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/atomic_write_na_write_race2.stderr b/tests/fail/data_race/atomic_write_na_write_race2.stderr index 9ee4f16d0d..6ac25e9ee4 100644 --- a/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -13,6 +13,22 @@ LL | atomic_ref.store(64, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... let atomic_ref = &mut *c.0; +LL | | ... *atomic_ref.get_mut() = 32; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dangling_thread_async_race.stderr b/tests/fail/data_race/dangling_thread_async_race.stderr index 1051a1c51f..9f8672adef 100644 --- a/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/tests/fail/data_race/dangling_thread_async_race.stderr @@ -13,6 +13,20 @@ LL | *c.0 = 32; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dangling_thread_async_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dangling_thread_async_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dangling_thread_async_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dangling_thread_async_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dangling_thread_async_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC + | +LL | / ... spawn(move || { +LL | | ... let c = c; // capture `c`, not just its field. +LL | | ... *c.0 = 64; +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_read_race1.stderr b/tests/fail/data_race/dealloc_read_race1.stderr index 8eb4ebbcf7..a4de96577e 100644 --- a/tests/fail/data_race/dealloc_read_race1.stderr +++ b/tests/fail/data_race/dealloc_read_race1.stderr @@ -18,6 +18,24 @@ LL | let _val = *ptr.0; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dealloc_read_race1.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dealloc_read_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dealloc_read_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dealloc_read_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dealloc_read_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | __rust_dealloc( +LL | | +... | +LL | | ); +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_read_race2.stderr b/tests/fail/data_race/dealloc_read_race2.stderr index 1a2b048572..e61557662e 100644 --- a/tests/fail/data_race/dealloc_read_race2.stderr +++ b/tests/fail/data_race/dealloc_read_race2.stderr @@ -22,6 +22,23 @@ LL | | ) | |_____________^ = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dealloc_read_race2.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dealloc_read_race2.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dealloc_read_race2.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dealloc_read_race2.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dealloc_read_race2.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... // Also an error of the form: Data race detected between (1) deallocation on thread `unnamed-ID` and (2) non-atomic read on thr... +LL | | ... // but the invalid allocation is detected first. +LL | | ... *ptr.0 +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_read_race_stack.stderr b/tests/fail/data_race/dealloc_read_race_stack.stderr index ce9719b1d4..f468681c3c 100644 --- a/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -13,6 +13,24 @@ LL | *pointer.load(Ordering::Acquire) = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC + | +LL | let j1 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | let pointer = &*ptr.0; +LL | | { +... | +LL | | } +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_write_race1.stderr b/tests/fail/data_race/dealloc_write_race1.stderr index 48d974241a..dee6fc6c13 100644 --- a/tests/fail/data_race/dealloc_write_race1.stderr +++ b/tests/fail/data_race/dealloc_write_race1.stderr @@ -18,6 +18,24 @@ LL | *ptr.0 = 2; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dealloc_write_race1.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dealloc_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dealloc_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dealloc_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dealloc_write_race1.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | __rust_dealloc( +LL | | +... | +LL | | ); +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_write_race2.stderr b/tests/fail/data_race/dealloc_write_race2.stderr index 077d458826..6d662fda29 100644 --- a/tests/fail/data_race/dealloc_write_race2.stderr +++ b/tests/fail/data_race/dealloc_write_race2.stderr @@ -22,6 +22,23 @@ LL | | ); | |_____________^ = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dealloc_write_race2.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dealloc_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dealloc_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dealloc_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dealloc_write_race2.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... // Also an error of the form: Data race detected between (1) deallocation on thread `unnamed-ID` and (2) non-atomic write on th... +LL | | ... // but the invalid allocation is detected first. +LL | | ... *ptr.0 = 2; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/dealloc_write_race_stack.stderr b/tests/fail/data_race/dealloc_write_race_stack.stderr index 2b531b6440..e495f1de86 100644 --- a/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -13,6 +13,24 @@ LL | *pointer.load(Ordering::Acquire) = 3; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC + | +LL | let j1 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | let pointer = &*ptr.0; +LL | | { +... | +LL | | } +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/enable_after_join_to_main.stderr b/tests/fail/data_race/enable_after_join_to_main.stderr index 5d5d1c8cc6..aa8808a784 100644 --- a/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/tests/fail/data_race/enable_after_join_to_main.stderr @@ -13,6 +13,21 @@ LL | *c.0 = 32; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/enable_after_join_to_main.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/enable_after_join_to_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/enable_after_join_to_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/enable_after_join_to_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/enable_after_join_to_main.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... *c.0 = 64; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/local_variable_alloc_race.stderr b/tests/fail/data_race/local_variable_alloc_race.stderr index 51a4c5cea3..8ac2bd75f6 100644 --- a/tests/fail/data_race/local_variable_alloc_race.stderr +++ b/tests/fail/data_race/local_variable_alloc_race.stderr @@ -13,6 +13,28 @@ LL | StorageLive(val); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/local_variable_alloc_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/local_variable_alloc_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/local_variable_alloc_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/local_variable_alloc_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/local_variable_alloc_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `spawn_thread` + --> tests/fail/data_race/local_variable_alloc_race.rs:LL:CC + | +LL | / std::thread::spawn(|| { +LL | | while P.load(Relaxed).is_null() { +LL | | std::hint::spin_loop(); +LL | | } +... | +LL | | } +LL | | }) + | |______^ +note: inside `main` + --> tests/fail/data_race/local_variable_alloc_race.rs:LL:CC + | +LL | Call(t = spawn_thread(), ReturnTo(after_spawn), UnwindContinue()) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/local_variable_read_race.stderr b/tests/fail/data_race/local_variable_read_race.stderr index 3faffd4131..a8f9e66770 100644 --- a/tests/fail/data_race/local_variable_read_race.stderr +++ b/tests/fail/data_race/local_variable_read_race.stderr @@ -13,6 +13,24 @@ LL | let _val = val; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/local_variable_read_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/local_variable_read_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/local_variable_read_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/local_variable_read_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/local_variable_read_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/local_variable_read_race.rs:LL:CC + | +LL | let t1 = std::thread::spawn(|| { + | ______________^ +LL | | while P.load(Relaxed).is_null() { +LL | | std::hint::spin_loop(); +LL | | } +... | +LL | | } +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/local_variable_write_race.stderr b/tests/fail/data_race/local_variable_write_race.stderr index 24bbe227f9..2c67b872f6 100644 --- a/tests/fail/data_race/local_variable_write_race.stderr +++ b/tests/fail/data_race/local_variable_write_race.stderr @@ -13,6 +13,24 @@ LL | let mut val: u8 = 0; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/local_variable_write_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/local_variable_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/local_variable_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/local_variable_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/local_variable_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/local_variable_write_race.rs:LL:CC + | +LL | let t1 = std::thread::spawn(|| { + | ______________^ +LL | | while P.load(Relaxed).is_null() { +LL | | std::hint::spin_loop(); +LL | | } +... | +LL | | } +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr b/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr index b829627c00..0668275e96 100644 --- a/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr +++ b/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr @@ -15,6 +15,38 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::scoped::::spawn_scoped::<'_, {closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC +note: inside closure + --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | thread::yield_now(); // make sure this happens last +LL | | if cfg!(match_first_load) { +LL | | a16.store(0, Ordering::SeqCst); +... | +LL | | } +LL | | }); + | |__________^ + = note: inside closure at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::::{closure#0}}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>::{closure#0}}>>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::::{closure#0}}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + | +LL | / thread::scope(|s| { +LL | | s.spawn(|| { +LL | | a16.load(Ordering::SeqCst); +LL | | }); +... | +LL | | }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr b/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr index 6bc38b14cb..3e9197d306 100644 --- a/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr +++ b/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr @@ -15,6 +15,38 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::scoped::::spawn_scoped::<'_, {closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC +note: inside closure + --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | thread::yield_now(); // make sure this happens last +LL | | if cfg!(match_first_load) { +LL | | a16.store(0, Ordering::SeqCst); +... | +LL | | } +LL | | }); + | |__________^ + = note: inside closure at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::::{closure#0}}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC}, ()>::{closure#0}}>>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::::{closure#0}}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + | +LL | / thread::scope(|s| { +LL | | s.spawn(|| { +LL | | a16.load(Ordering::SeqCst); +LL | | }); +... | +LL | | }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_read_write.read_write.stderr b/tests/fail/data_race/mixed_size_read_write.read_write.stderr index 6f8dbd38ca..1690698e94 100644 --- a/tests/fail/data_race/mixed_size_read_write.read_write.stderr +++ b/tests/fail/data_race/mixed_size_read_write.read_write.stderr @@ -15,6 +15,38 @@ LL | a8[0].load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/mixed_size_read_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::scoped::::spawn_scoped::<'_, {closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC +note: inside closure + --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... if cfg!(read_write) { +LL | | ... // Let the other one go first. +LL | | ... thread::yield_now(); +... | +LL | | ... +LL | | ... }); + | |________^ + = note: inside closure at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::::{closure#0}}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>::{closure#0}}>>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::::{closure#0}}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC + | +LL | / thread::scope(|s| { +LL | | s.spawn(|| { +LL | | if cfg!(read_write) { +LL | | // Let the other one go first. +... | +LL | | }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_read_write.write_read.stderr b/tests/fail/data_race/mixed_size_read_write.write_read.stderr index 990d2058bc..35349c15a1 100644 --- a/tests/fail/data_race/mixed_size_read_write.write_read.stderr +++ b/tests/fail/data_race/mixed_size_read_write.write_read.stderr @@ -15,6 +15,38 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/mixed_size_read_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::scoped::::spawn_scoped::<'_, {closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC +note: inside closure + --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... if cfg!(write_read) { +LL | | ... // Let the other one go first. +LL | | ... thread::yield_now(); +... | +LL | | ... +LL | | ... }); + | |________^ + = note: inside closure at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::::{closure#0}}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/fail/data_race/mixed_size_read_write.rs:LL:CC}, ()>::{closure#0}}>>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::::{closure#0}}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC + | +LL | / thread::scope(|s| { +LL | | s.spawn(|| { +LL | | if cfg!(read_write) { +LL | | // Let the other one go first. +... | +LL | | }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_write_write.fst.stderr b/tests/fail/data_race/mixed_size_write_write.fst.stderr index a353910dcc..967ee1d5ab 100644 --- a/tests/fail/data_race/mixed_size_write_write.fst.stderr +++ b/tests/fail/data_race/mixed_size_write_write.fst.stderr @@ -15,6 +15,36 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/mixed_size_write_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::scoped::::spawn_scoped::<'_, {closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC +note: inside closure + --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let idx = if cfg!(fst) { 0 } else { 1 }; +LL | | ... a8[idx].store(1, Ordering::SeqCst); +LL | | ... +LL | | ... }); + | |________^ + = note: inside closure at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::::{closure#0}}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>::{closure#0}}>>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::::{closure#0}}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC + | +LL | / thread::scope(|s| { +LL | | s.spawn(|| { +LL | | a16.store(1, Ordering::SeqCst); +LL | | }); +... | +LL | | }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/mixed_size_write_write.snd.stderr b/tests/fail/data_race/mixed_size_write_write.snd.stderr index 3b9c049150..b9302287d4 100644 --- a/tests/fail/data_race/mixed_size_write_write.snd.stderr +++ b/tests/fail/data_race/mixed_size_write_write.snd.stderr @@ -15,6 +15,36 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/mixed_size_write_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::scoped::::spawn_scoped::<'_, {closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `std::thread::Scope::<'_, '_>::spawn::<{closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/scoped.rs:LL:CC +note: inside closure + --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let idx = if cfg!(fst) { 0 } else { 1 }; +LL | | ... a8[idx].store(1, Ordering::SeqCst); +LL | | ... +LL | | ... }); + | |________^ + = note: inside closure at RUSTLIB/std/src/thread/scoped.rs:LL:CC + = note: inside `::{closure#0}}> as std::ops::FnOnce<()>>::call_once` at RUSTLIB/core/src/panic/unwind_safe.rs:LL:CC + = note: inside `std::panicking::r#try::do_call::::{closure#0}}>, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panicking::r#try::<(), std::panic::AssertUnwindSafe<{closure@std::thread::scope<'_, {closure@tests/fail/data_race/mixed_size_write_write.rs:LL:CC}, ()>::{closure#0}}>>` at RUSTLIB/std/src/panicking.rs:LL:CC + = note: inside `std::panic::catch_unwind::::{closure#0}}>, ()>` at RUSTLIB/std/src/panic.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC + | +LL | / thread::scope(|s| { +LL | | s.spawn(|| { +LL | | a16.store(1, Ordering::SeqCst); +LL | | }); +... | +LL | | }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/read_write_race.stderr b/tests/fail/data_race/read_write_race.stderr index eac5a0c8a6..7794d7ccfa 100644 --- a/tests/fail/data_race/read_write_race.stderr +++ b/tests/fail/data_race/read_write_race.stderr @@ -13,6 +13,21 @@ LL | let _val = *c.0; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/read_write_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/read_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/read_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/read_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/read_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/read_write_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... *c.0 = 64; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/read_write_race_stack.stderr b/tests/fail/data_race/read_write_race_stack.stderr index 9af78bc79a..83c653daf3 100644 --- a/tests/fail/data_race/read_write_race_stack.stderr +++ b/tests/fail/data_race/read_write_race_stack.stderr @@ -13,6 +13,24 @@ LL | *pointer.load(Ordering::Acquire) = 3; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/read_write_race_stack.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/read_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/read_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/read_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/read_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/read_write_race_stack.rs:LL:CC + | +LL | ... let j1 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... // Concurrent allocate the memory. +LL | | ... // Uses relaxed semantics to not generate +... | +LL | | ... stack_var +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/relax_acquire_race.stderr b/tests/fail/data_race/relax_acquire_race.stderr index a358d8da36..be32561969 100644 --- a/tests/fail/data_race/relax_acquire_race.stderr +++ b/tests/fail/data_race/relax_acquire_race.stderr @@ -13,6 +13,24 @@ LL | *c.0 = 1; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/relax_acquire_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/relax_acquire_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/relax_acquire_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/relax_acquire_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/relax_acquire_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/relax_acquire_race.rs:LL:CC + | +LL | ... let j3 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... if SYNC.load(Ordering::Acquire) == 2 { +LL | | ... *c.0 +... | +LL | | ... } +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/release_seq_race.stderr b/tests/fail/data_race/release_seq_race.stderr index f47e463dd6..5fd423c1b1 100644 --- a/tests/fail/data_race/release_seq_race.stderr +++ b/tests/fail/data_race/release_seq_race.stderr @@ -13,6 +13,24 @@ LL | *c.0 = 1; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/release_seq_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/release_seq_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/release_seq_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/release_seq_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/release_seq_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/release_seq_race.rs:LL:CC + | +LL | let j3 = spawn(move || { + | __________________^ +LL | | let c = c; // avoid field capturing +LL | | sleep(Duration::from_millis(500)); +LL | | if SYNC.load(Ordering::Acquire) == 3 { +... | +LL | | } +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/release_seq_race_same_thread.stderr b/tests/fail/data_race/release_seq_race_same_thread.stderr index 2d26d4cf68..775ebd5da5 100644 --- a/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -13,6 +13,24 @@ LL | *c.0 = 1; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... if SYNC.load(Ordering::Acquire) == 2 { +LL | | ... *c.0 +... | +LL | | ... } +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/rmw_race.stderr b/tests/fail/data_race/rmw_race.stderr index 4a991db32d..ca4017f44b 100644 --- a/tests/fail/data_race/rmw_race.stderr +++ b/tests/fail/data_race/rmw_race.stderr @@ -13,6 +13,24 @@ LL | *c.0 = 1; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/rmw_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/rmw_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/rmw_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/rmw_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/rmw_race.rs:LL:CC}, u32>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/rmw_race.rs:LL:CC + | +LL | ... let j3 = spawn(move || { + | ________________^ +LL | | ... let c = c; // capture `c`, not just its field. +LL | | ... if SYNC.load(Ordering::Acquire) == 3 { +LL | | ... *c.0 +... | +LL | | ... } +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/write_write_race.stderr b/tests/fail/data_race/write_write_race.stderr index 2ea54421b8..38537e145f 100644 --- a/tests/fail/data_race/write_write_race.stderr +++ b/tests/fail/data_race/write_write_race.stderr @@ -13,6 +13,21 @@ LL | *c.0 = 32; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/write_write_race.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/write_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/write_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/write_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/write_write_race.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/write_write_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... *c.0 = 64; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/write_write_race_stack.stderr b/tests/fail/data_race/write_write_race_stack.stderr index 0cd9de1131..7c51564b8e 100644 --- a/tests/fail/data_race/write_write_race_stack.stderr +++ b/tests/fail/data_race/write_write_race_stack.stderr @@ -13,6 +13,24 @@ LL | *pointer.load(Ordering::Acquire) = 3; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/data_race/write_write_race_stack.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/data_race/write_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/data_race/write_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/data_race/write_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/data_race/write_write_race_stack.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/data_race/write_write_race_stack.rs:LL:CC + | +LL | let j1 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | // Concurrent allocate the memory. +LL | | // Uses relaxed semantics to not generate +... | +LL | | stack_var +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr b/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr index fd5d83211d..3eac0a84a9 100644 --- a/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr @@ -16,6 +16,23 @@ LL | unsafe { ptr.0.read() }; = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC + | +LL | let t = thread::spawn(move || { + | _____________^ +LL | | let ptr = ptr; +LL | | // We do a protected mutable retag (but no write!) in this thread. +LL | | fn retag(_x: &mut i32) {} +LL | | retag(unsafe { &mut *ptr.0 }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/stacked_borrows/retag_data_race_read.stderr b/tests/fail/stacked_borrows/retag_data_race_read.stderr index 87155ebc51..10a77bcf34 100644 --- a/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -21,6 +21,17 @@ note: inside closure | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC + | +LL | let t2 = std::thread::spawn(move || thread_2(p)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index 47341e027d..7b5a32b688 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -33,6 +33,24 @@ LL | *x = 64; = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC + | +LL | let thread_2 = thread::spawn(move || { + | ____________________^ +LL | | let b = (2, by); +LL | | synchronized!(b, "start"); +LL | | let ptr = ptr; +... | +LL | | synchronized!(b, "end"); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index 504b8cc0ac..6253d4f6da 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -33,6 +33,24 @@ LL | } = help: this transition corresponds to a loss of read and write permissions = note: BACKTRACE (of the first span) on thread `unnamed-ID`: = note: inside closure at tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `main` + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC + | +LL | let thread_2 = thread::spawn(move || { + | ____________________^ +LL | | let b = (2, by); +LL | | synchronized!(b, "start"); +LL | | let ptr = ptr; +... | +LL | | synchronized!(b, "end"); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/spurious_read.stderr b/tests/fail/tree_borrows/spurious_read.stderr index bd26b4e36d..55c8ad5d6f 100644 --- a/tests/fail/tree_borrows/spurious_read.stderr +++ b/tests/fail/tree_borrows/spurious_read.stderr @@ -37,6 +37,29 @@ note: inside closure | LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/tree_borrows/spurious_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/tree_borrows/spurious_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/tree_borrows/spurious_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/tree_borrows/spurious_read.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `retagx_retagy_retx_writey_rety` + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC + | +LL | let thread_y = thread::spawn(move || { + | ____________________^ +LL | | let b = (2, by); +LL | | synchronized!(b, "start"); +LL | | let ptr = ptr; +... | +LL | | synchronized!(b, "end"); +LL | | }); + | |______^ +note: inside `main` + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC + | +LL | retagx_retagy_retx_writey_rety(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/weak_memory/weak_uninit.stderr b/tests/fail/weak_memory/weak_uninit.stderr index 816bd323f4..e22c84cfe1 100644 --- a/tests/fail/weak_memory/weak_uninit.stderr +++ b/tests/fail/weak_memory/weak_uninit.stderr @@ -8,6 +8,22 @@ LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail/weak_memory/weak_uninit.rs:LL:CC + = note: thread `unnamed-ID` was spawned by thread `main` + = note: inside `std::sys::pal::PLATFORM::thread::Thread::new` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked_::<'_, {closure@tests/fail/weak_memory/weak_uninit.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn_unchecked::<{closure@tests/fail/weak_memory/weak_uninit.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::Builder::spawn::<{closure@tests/fail/weak_memory/weak_uninit.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC + = note: inside `std::thread::spawn::<{closure@tests/fail/weak_memory/weak_uninit.rs:LL:CC}, usize>` at RUSTLIB/std/src/thread/mod.rs:LL:CC +note: inside `relaxed` + --> tests/fail/weak_memory/weak_uninit.rs:LL:CC + | +LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: inside `main` + --> tests/fail/weak_memory/weak_uninit.rs:LL:CC + | +LL | relaxed(); + | ^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace