diff --git a/ci/ci.sh b/ci/ci.sh index 2d27f02749..2dd8fc7745 100755 --- a/ci/ci.sh +++ b/ci/ci.sh @@ -152,7 +152,7 @@ case $HOST_TARGET in # Partially supported targets (tier 2) BASIC="empty_main integer heap_alloc libc-mem vec string btreemap" # ensures we have the basics: pre-main code, system allocator UNIX="hello panic/panic panic/unwind concurrency/simple atomic libc-mem libc-misc libc-random env num_cpus" # the things that are very similar across all Unixes, and hence easily supported there - TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd + TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd prctl TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std empty_main wasm # this target doesn't really have std TEST_TARGET=thumbv7em-none-eabihf run_tests_minimal no_std ;; diff --git a/src/diagnostics.rs b/src/diagnostics.rs index e53c41157a..6d67bb0b08 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -250,7 +250,7 @@ pub fn report_result<'tcx>( StackedBorrowsUb { .. } | TreeBorrowsUb { .. } | DataRace { .. } => Some("Undefined Behavior"), LocalDeadlock => { - labels.push(format!("this thread got stuck here")); + labels.push(format!("thread got stuck here")); None } GlobalDeadlock => { @@ -264,10 +264,7 @@ pub fn report_result<'tcx>( report_msg( DiagLevel::Error, format!("the evaluated program deadlocked"), - vec![format!( - "thread `{}` got stuck here", - ecx.machine.threads.get_thread_display_name(thread) - )], + vec![format!("thread got stuck here")], vec![], vec![], &stacktrace, @@ -558,34 +555,24 @@ pub fn report_msg<'tcx>( thread: Option, machine: &MiriMachine<'tcx>, ) { - let span = match stacktrace.first() { - Some(fi) => fi.span, - None => - match thread { - Some(thread_id) => machine.threads.thread_ref(thread_id).origin_span, - None => DUMMY_SP, - }, - }; - let sess = machine.tcx.sess; + let origin_span = thread.map(|t| machine.threads.thread_ref(t).origin_span).unwrap_or(DUMMY_SP); + let span = stacktrace.first().map(|fi| fi.span).unwrap_or(origin_span); + // The only time we do not have an origin span is for `main`, and there we check the signature + // upfront. So we should always have a span here. + assert!(!span.is_dummy()); + + let tcx = machine.tcx; let level = match diag_level { DiagLevel::Error => Level::Error, DiagLevel::Warning => Level::Warning, DiagLevel::Note => Level::Note, }; - let mut err = Diag::<()>::new(sess.dcx(), level, title); + let mut err = Diag::<()>::new(tcx.sess.dcx(), level, title); err.span(span); // Show main message. - if !span.is_dummy() { - for line in span_msg { - err.span_label(span, line); - } - } else { - // Make sure we show the message even when it is a dummy span. - for line in span_msg { - err.note(line); - } - err.note("(no span available)"); + for line in span_msg { + err.span_label(span, line); } // Show note and help messages. @@ -608,36 +595,56 @@ pub fn report_msg<'tcx>( } // Add backtrace - if stacktrace.len() > 1 { - let mut backtrace_title = String::from("BACKTRACE"); - if extra_span { - write!(backtrace_title, " (of the first span)").unwrap(); + if let Some((first, rest)) = stacktrace.split_first() { + // Start with the function and thread that contain the first span. + let mut fn_and_thread = String::new(); + // Only print thread name if there are multiple threads. + if let Some(thread) = thread + && machine.threads.get_total_thread_count() > 1 + { + write!( + fn_and_thread, + "on thread `{}`", + machine.threads.get_thread_display_name(thread) + ) + .unwrap(); } - if let Some(thread) = thread { - let thread_name = machine.threads.get_thread_display_name(thread); - if thread_name != "main" { - // Only print thread name if it is not `main`. - write!(backtrace_title, " on thread `{thread_name}`").unwrap(); - }; + // Only print function name if we show a backtrace + if rest.len() > 0 || !origin_span.is_dummy() { + if !fn_and_thread.is_empty() { + fn_and_thread.push_str(", "); + } + write!(fn_and_thread, "{first}").unwrap(); } - write!(backtrace_title, ":").unwrap(); - err.note(backtrace_title); - for (idx, frame_info) in stacktrace.iter().enumerate() { + if !fn_and_thread.is_empty() { + if extra_span && rest.len() > 0 { + // Print a `span_note` as otherwise the backtrace looks attached to the last + // `span_help`. We somewhat arbitrarily use the span of the surrounding function. + err.span_note( + tcx.def_span(first.instance.def_id()), + format!("{level} occurred {fn_and_thread}"), + ); + } else { + err.note(format!("this is {fn_and_thread}")); + } + } + // Continue with where that function got called. + for frame_info in rest.iter() { let is_local = machine.is_local(frame_info.instance); // No span for non-local frames and the first frame (which is the error site). - if is_local && idx > 0 { - err.subdiagnostic(frame_info.as_note(machine.tcx)); + if is_local { + err.span_note(frame_info.span, format!("which got called {frame_info}")); } else { - let sm = sess.source_map(); + let sm = tcx.sess.source_map(); let span = sm.span_to_embeddable_string(frame_info.span); - err.note(format!("{frame_info} at {span}")); + err.note(format!("which got called {frame_info} (at {span})")); } } - } else if stacktrace.len() == 0 && !span.is_dummy() { - err.note(format!( - "this {} occurred while pushing a call frame onto an empty stack", - level.to_str() - )); + if !origin_span.is_dummy() { + err.span_note(origin_span, format!("which got called indirectly due to this code")); + } + } else if !span.is_dummy() { + err.note(format!("this {level} occurred while pushing a call frame onto an empty stack")); err.note("the span indicates which code caused the function to be called, but may not be the literal call site"); } diff --git a/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr b/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr index 003ddb9b28..b943ac1f61 100644 --- a/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr +++ b/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr @@ -6,6 +6,15 @@ LL | let _val = atomic_ref.load(Ordering::Relaxed); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let atomic_ref = unsafe { &*lock.get().cast::() }; +LL | | ... let _val = atomic_ref.load(Ordering::Relaxed); +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_cond_move.init.stderr b/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr index f3f64a60a8..4507c1bfa2 100644 --- a/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_cond_destroy(cond2.as_mut_ptr()); | = 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: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC | LL | check() diff --git a/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr b/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr index 4056f7d9d4..6132785b13 100644 --- a/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_cond_destroy(&mut cond2 as *mut _); | = 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: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC | LL | check() diff --git a/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr b/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr index 618584a117..60c4bd7f05 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr @@ -6,6 +6,7 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = 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: this is on thread `main` 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_joined.stderr b/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr index a9f16a96ad..87eed26bca 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = 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: this is on thread `main` 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_main.stderr b/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index 46c9c5d3d7..c364642fc6 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_main.stderr @@ -6,6 +6,17 @@ LL | ... assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 8a16f82a93..b9bf801eaf 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr @@ -6,6 +6,15 @@ LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 dec0139bd8..ddf3372a72 100644 --- a/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_join_self.stderr @@ -6,6 +6,18 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 e3b0036c9a..1e7b0abf34 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | / thread::spawn(move || { @@ -21,7 +20,16 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }) + | |__________^ 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_free_while_queued.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr index 7b6e05828c..765604ea00 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr @@ -6,15 +6,23 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = 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: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure + = note: this is on thread `unnamed-ID`, inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC | LL | drop(unsafe { Box::from_raw(m.get().cast::()) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | // Ensure we happen-after the initialization write. +LL | | assert!(initialized.load(Ordering::Acquire)); +... | +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_move.init.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr index a7cba0f00f..f9e06c75e0 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_mutex_lock(&mut m2 as *mut _); | = 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: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | check(); diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr index 71f71efa0d..643518c606 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_mutex_unlock(&mut m2 as *mut _); | = 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: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | check(); diff --git a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr index 782322d5c3..d7c69e0884 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr @@ -2,7 +2,7 @@ error: a thread deadlocked --> tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut mutex as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here 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_read_while_queued.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr index 42dbd5f02c..fd9cddebab 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr @@ -6,6 +6,15 @@ LL | ... let _val = atomic_ref.load(Ordering::Relaxed); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let atomic_ref = unsafe { &*m.get().byte_add(OFFSET).cast::() }; +LL | | ... let _val = atomic_ref.load(Ordering::Relaxed); +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_write_while_queued.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr index 4705f9a1b5..02a0f25af4 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr @@ -6,6 +6,15 @@ LL | atomic_ref.store(0, Ordering::Relaxed); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | let atomic_ref = unsafe { &*m.get().byte_add(OFFSET).cast::() }; +LL | | atomic_ref.store(0, Ordering::Relaxed); +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_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index c7d858a444..25dae98ef5 100644 --- a/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr @@ -6,6 +6,14 @@ LL | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0 | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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_write_deadlock_single_thread.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr index ea8cbcada9..57bd956dd3 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr @@ -2,7 +2,7 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_wrlock(rw.get()); - | ^ thread `main` got stuck here + | ^ thread got stuck here 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 f1f5c50baf..37c7540afb 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 @@ -6,6 +6,14 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 255632870e..0818f213f5 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 @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | / thread::spawn(move || { @@ -21,7 +20,16 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }) + | |__________^ 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_single_thread.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr index 0208a5bae4..e6b6926235 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr @@ -2,7 +2,7 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_rdlock(rw.get()); - | ^ thread `main` got stuck here + | ^ thread got stuck here 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_write_deadlock.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index 6891b989d0..4ee88c0059 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 @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | / thread::spawn(move || { @@ -21,7 +20,16 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }) + | |__________^ 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_write_deadlock_single_thread.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr index 314e60b023..25435eadd7 100644 --- a/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr +++ b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr @@ -2,7 +2,7 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_wrlock(rw.get()); - | ^ thread `main` got stuck here + | ^ thread got stuck here 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_wrong_owner.stderr b/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index fdf4297c56..94578338f4 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 @@ -6,6 +6,14 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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/concurrency/windows_join_detached.stderr b/tests/fail-dep/concurrency/windows_join_detached.stderr index 52affb767d..1765f0a180 100644 --- a/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -6,11 +6,10 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( | = 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: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC | LL | thread.join().unwrap(); diff --git a/tests/fail-dep/concurrency/windows_join_main.stderr b/tests/fail-dep/concurrency/windows_join_main.stderr index d9cc93d0fc..ee0aa254ab 100644 --- a/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/tests/fail-dep/concurrency/windows_join_main.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | / thread::spawn(|| { @@ -22,8 +21,18 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread `unnamed-ID` got stuck here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC + | +LL | / thread::spawn(|| { +LL | | unsafe { +LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); +LL | | } +LL | | }) + | |______^ = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/concurrency/windows_join_self.stderr b/tests/fail-dep/concurrency/windows_join_self.stderr index f5515983da..561464d471 100644 --- a/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/tests/fail-dep/concurrency/windows_join_self.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | / thread::spawn(|| { @@ -24,7 +23,19 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC + | +LL | / thread::spawn(|| { +LL | | unsafe { +LL | | let native = GetCurrentThread(); +LL | | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); +LL | | } +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 2b10a322b0..eed33569af 100644 --- a/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/tests/fail-dep/libc/env-set_var-data-race.stderr @@ -11,6 +11,17 @@ LL | env::set_var("MY_RUST_VAR", "Ferris"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 53ae7ea82b..d0c8169fe7 100644 --- a/tests/fail-dep/libc/eventfd_block_read_twice.stderr +++ b/tests/fail-dep/libc/eventfd_block_read_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,19 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC | LL | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8).try_into().unwrap() }; - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | assert_eq!(counter, 1_u64); +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 62810f17be..878059cb5e 100644 --- a/tests/fail-dep/libc/eventfd_block_write_twice.stderr +++ b/tests/fail-dep/libc/eventfd_block_write_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,21 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC | LL | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8).try_into().unwrap() - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 that all subsequent writes will block. +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/fcntl_fsetfl_while_blocking.stderr b/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr index 307762fb12..f2f6f373a2 100644 --- a/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr +++ b/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr @@ -2,7 +2,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs:LL:CC | LL | let _res = unsafe { libc::read(fds[0], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr b/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr index 981f055e12..ec7b681dfa 100644 --- a/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr +++ b/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr @@ -6,9 +6,8 @@ LL | let _fd = unsafe { libc::mkstemp(s) }; | = 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: - = note: inside `test_mkstemp_immutable_arg` at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC -note: inside `main` + = note: this is inside `test_mkstemp_immutable_arg` +note: which got called inside `main` --> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC | LL | test_mkstemp_immutable_arg(); diff --git a/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr b/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr index 298e67f146..9f5ea4ed02 100644 --- a/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr +++ b/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr @@ -6,9 +6,8 @@ LL | let _fd = unsafe { libc::open(name_ptr, libc::O_CREAT) }; | = 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: - = note: inside `test_file_open_missing_needed_mode` at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC -note: inside `main` + = note: this is inside `test_file_open_missing_needed_mode` +note: which got called inside `main` --> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC | LL | test_file_open_missing_needed_mode(); diff --git a/tests/fail-dep/libc/libc-epoll-data-race.stderr b/tests/fail-dep/libc/libc-epoll-data-race.stderr index a322de74b5..e606a03e46 100644 --- a/tests/fail-dep/libc/libc-epoll-data-race.stderr +++ b/tests/fail-dep/libc/libc-epoll-data-race.stderr @@ -11,6 +11,7 @@ LL | unsafe { VAL_TWO = 51 }; | ^^^^^^^^^^^^ = 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: this is on thread `main` 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 dba12d1903..f7f77647ac 100644 --- a/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr +++ b/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,18 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC | LL | check_epoll_wait::(epfd, &expected, -1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread `unnamed-ID` got stuck here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | check_epoll_wait::(epfd, &expected, -1); +LL | | +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs b/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs index 4b731866ac..d923667d87 100644 --- a/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs +++ b/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs @@ -5,6 +5,6 @@ fn main() { let mut buf = vec![0u8; 15]; unsafe { - libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr().cast::()); //~ ERROR: memory access failed: expected a pointer to 16 bytes of memory, but got alloc952 which is only 15 bytes from the end of the allocation + libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr().cast::()); //~ ERROR: memory access failed } } diff --git a/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr b/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr index 275a38e593..cc50564a43 100644 --- a/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr +++ b/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr @@ -1,18 +1,16 @@ -error: Undefined Behavior: memory access failed: expected a pointer to 16 bytes of memory, but got ALLOC which is only 15 bytes from the end of the allocation - --> tests/fail-dep/libc/prctl-threadname.rs:LL:CC +error: Undefined Behavior: memory access failed: attempting to access 16 bytes, but got ALLOC which is only 15 bytes from the end of the allocation + --> tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs:LL:CC | LL | libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr().cast::()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 16 bytes of memory, but got ALLOC which is only 15 bytes from the end of the allocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = 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 help: ALLOC was allocated here: - --> tests/fail-dep/libc/prctl-threadname.rs:LL:CC + --> tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs:LL:CC | LL | let mut buf = vec![0u8; 15]; | ^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `main` at tests/fail-dep/libc/prctl-threadname.rs:LL:CC = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair-close-while-blocked.stderr b/tests/fail-dep/libc/socketpair-close-while-blocked.stderr index a7c660e1ad..b1b1fddc67 100644 --- a/tests/fail-dep/libc/socketpair-close-while-blocked.stderr +++ b/tests/fail-dep/libc/socketpair-close-while-blocked.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC | LL | thread1.join().unwrap(); @@ -18,7 +17,21 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC | LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC + | +LL | let thread1 = thread::spawn(move || { + | ___________________^ +LL | | let mut buf: [u8; 1] = [0; 1]; +LL | | let _res: i32 = unsafe { +LL | | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) +... | +LL | | }; +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair-data-race.stderr b/tests/fail-dep/libc/socketpair-data-race.stderr index 7cee4b83ba..fa7e45bccd 100644 --- a/tests/fail-dep/libc/socketpair-data-race.stderr +++ b/tests/fail-dep/libc/socketpair-data-race.stderr @@ -11,6 +11,7 @@ LL | unsafe { VAL = 1 }; | ^^^^^^^ = 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: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair_block_read_twice.stderr b/tests/fail-dep/libc/socketpair_block_read_twice.stderr index faab75f784..a556ba592e 100644 --- a/tests/fail-dep/libc/socketpair_block_read_twice.stderr +++ b/tests/fail-dep/libc/socketpair_block_read_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,21 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC | LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | // Let this thread block on read. +LL | | let mut buf: [u8; 1] = [0; 1]; +LL | | let res = unsafe { +... | +LL | | assert_eq!(&buf, "a".as_bytes()); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair_block_write_twice.stderr b/tests/fail-dep/libc/socketpair_block_write_twice.stderr index 9f95d98beb..259ca6bd83 100644 --- a/tests/fail-dep/libc/socketpair_block_write_twice.stderr +++ b/tests/fail-dep/libc/socketpair_block_write_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,21 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC | LL | let res = unsafe { libc::write(fds[0], data.as_ptr() as *const libc::c_void, data.len()) }; - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | let data = "a".as_bytes(); +LL | | // The write below will be blocked because the buffer is already full. +LL | | let res = unsafe { libc::write(fds[0], data.as_ptr() as *const libc::c_void, data.len()) }; +LL | | +LL | | assert_eq!(res, data.len().cast_signed()); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail-dep/libc/socketpair_read_blocking.stderr b/tests/fail-dep/libc/socketpair_read_blocking.stderr deleted file mode 100644 index caf23da115..0000000000 --- a/tests/fail-dep/libc/socketpair_read_blocking.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: deadlock: the evaluated program deadlocked - --> tests/fail-dep/libc/socketpair_read_blocking.rs:LL:CC - | -LL | let _res = unsafe { libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) }; - | ^ the evaluated program deadlocked - | - = note: BACKTRACE: - = note: inside `main` at tests/fail-dep/libc/socketpair_read_blocking.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/tests/fail-dep/libc/socketpair_write_blocking.stderr b/tests/fail-dep/libc/socketpair_write_blocking.stderr deleted file mode 100644 index 2dc420d5f1..0000000000 --- a/tests/fail-dep/libc/socketpair_write_blocking.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: deadlock: the evaluated program deadlocked - --> tests/fail-dep/libc/socketpair_write_blocking.rs:LL:CC - | -LL | let _ = unsafe { libc::write(fds[0], data as *const libc::c_void, 3) }; - | ^ the evaluated program deadlocked - | - = note: BACKTRACE: - = note: inside `main` at tests/fail-dep/libc/socketpair_write_blocking.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/tests/fail/alloc/alloc_error_handler.stderr b/tests/fail/alloc/alloc_error_handler.stderr index b85a23e3c7..bd62bf148d 100644 --- a/tests/fail/alloc/alloc_error_handler.stderr +++ b/tests/fail/alloc/alloc_error_handler.stderr @@ -7,14 +7,13 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort() | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside closure at RUSTLIB/std/src/alloc.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::alloc::rust_oom::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::alloc::rust_oom` at RUSTLIB/std/src/alloc.rs:LL:CC - = note: inside `std::alloc::_::__rust_alloc_error_handler` at RUSTLIB/std/src/alloc.rs:LL:CC - = note: inside `std::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `std::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` + = note: this is inside closure + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::alloc::rust_oom::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::alloc::rust_oom` (at RUSTLIB/std/src/alloc.rs:LL:CC) + = note: which got called inside `std::alloc::_::__rust_alloc_error_handler` (at RUSTLIB/std/src/alloc.rs:LL:CC) + = note: which got called inside `std::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `std::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) +note: which got called inside `main` --> tests/fail/alloc/alloc_error_handler.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); diff --git a/tests/fail/alloc/alloc_error_handler_custom.stderr b/tests/fail/alloc/alloc_error_handler_custom.stderr index f8a96758aa..7e7871dc89 100644 --- a/tests/fail/alloc/alloc_error_handler_custom.stderr +++ b/tests/fail/alloc/alloc_error_handler_custom.stderr @@ -5,18 +5,17 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `alloc_error_handler` at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC -note: inside `_::__rust_alloc_error_handler` + = note: this is inside `alloc_error_handler` +note: which got called inside `_::__rust_alloc_error_handler` --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | #[alloc_error_handler] | ---------------------- in this attribute macro expansion LL | fn alloc_error_handler(layout: Layout) -> ! { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `alloc::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `alloc::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `miri_start` + = note: which got called inside `alloc::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `alloc::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) +note: which got called inside `miri_start` --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); diff --git a/tests/fail/alloc/alloc_error_handler_no_std.stderr b/tests/fail/alloc/alloc_error_handler_no_std.stderr index 488b1d879e..b126cb042b 100644 --- a/tests/fail/alloc/alloc_error_handler_no_std.stderr +++ b/tests/fail/alloc/alloc_error_handler_no_std.stderr @@ -7,12 +7,11 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `panic_handler` at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC - = note: inside `alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `alloc::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `alloc::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `miri_start` + = note: this is inside `panic_handler` + = note: which got called inside `alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `alloc::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `alloc::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) +note: which got called inside `miri_start` --> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); diff --git a/tests/fail/alloc/global_system_mixup.stderr b/tests/fail/alloc/global_system_mixup.stderr index 5a5f749623..27464a5a29 100644 --- a/tests/fail/alloc/global_system_mixup.stderr +++ b/tests/fail/alloc/global_system_mixup.stderr @@ -6,10 +6,9 @@ LL | FREE(); | = 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: - = note: inside `std::sys::alloc::PLATFORM::::dealloc` at RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC - = note: inside `::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC -note: inside `main` + = note: this is inside `std::sys::alloc::PLATFORM::::dealloc` + = note: which got called inside `::deallocate` (at RUSTLIB/std/src/alloc.rs:LL:CC) +note: which got called inside `main` --> tests/fail/alloc/global_system_mixup.rs:LL:CC | LL | unsafe { System.deallocate(ptr, l) }; diff --git a/tests/fail/alloc/stack_free.stderr b/tests/fail/alloc/stack_free.stderr index 6e98a7abc7..ec052fcb6b 100644 --- a/tests/fail/alloc/stack_free.stderr +++ b/tests/fail/alloc/stack_free.stderr @@ -6,11 +6,10 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = 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: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside `main` + = note: this is inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside `main` --> tests/fail/alloc/stack_free.rs:LL:CC | LL | drop(bad_box); diff --git a/tests/fail/async-shared-mutable.stack.stderr b/tests/fail/async-shared-mutable.stack.stderr index bc3db8c680..9949dad128 100644 --- a/tests/fail/async-shared-mutable.stack.stderr +++ b/tests/fail/async-shared-mutable.stack.stderr @@ -20,15 +20,18 @@ help: was later invalidated at offsets [OFFSET] by a SharedReadOnly retag | LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/async-shared-mutable.rs:LL:CC - = note: inside ` as std::future::Future>::poll` at RUSTLIB/core/src/future/poll_fn.rs:LL:CC -note: inside closure +note: error occurred inside closure + --> tests/fail/async-shared-mutable.rs:LL:CC + | +LL | core::future::poll_fn(move |_| { + | ^^^^^^^^ + = note: which got called inside ` as std::future::Future>::poll` (at RUSTLIB/core/src/future/poll_fn.rs:LL:CC) +note: which got called inside closure --> tests/fail/async-shared-mutable.rs:LL:CC | LL | .await | ^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/async-shared-mutable.rs:LL:CC | LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); diff --git a/tests/fail/async-shared-mutable.tree.stderr b/tests/fail/async-shared-mutable.tree.stderr index dc8b4f6665..c204f75c4f 100644 --- a/tests/fail/async-shared-mutable.tree.stderr +++ b/tests/fail/async-shared-mutable.tree.stderr @@ -28,15 +28,18 @@ help: the accessed tag later transitioned to Frozen due to a reborrow (act LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ^^^^^^^^^^ = help: this transition corresponds to a loss of write permissions - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/async-shared-mutable.rs:LL:CC - = note: inside ` as std::future::Future>::poll` at RUSTLIB/core/src/future/poll_fn.rs:LL:CC -note: inside closure +note: error occurred inside closure + --> tests/fail/async-shared-mutable.rs:LL:CC + | +LL | core::future::poll_fn(move |_| { + | ^^^^^^^^ + = note: which got called inside ` as std::future::Future>::poll` (at RUSTLIB/core/src/future/poll_fn.rs:LL:CC) +note: which got called inside closure --> tests/fail/async-shared-mutable.rs:LL:CC | LL | .await | ^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/async-shared-mutable.rs:LL:CC | LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); diff --git a/tests/fail/both_borrows/aliasing_mut1.stack.stderr b/tests/fail/both_borrows/aliasing_mut1.stack.stderr index 196eaeb3fb..bb5e731545 100644 --- a/tests/fail/both_borrows/aliasing_mut1.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut1.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn safe(x: &mut i32, y: &mut i32) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); diff --git a/tests/fail/both_borrows/aliasing_mut1.tree.stderr b/tests/fail/both_borrows/aliasing_mut1.tree.stderr index b9e6e25478..34f56696e0 100644 --- a/tests/fail/both_borrows/aliasing_mut1.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut1.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | fn safe(x: &mut i32, y: &mut i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); diff --git a/tests/fail/both_borrows/aliasing_mut2.stack.stderr b/tests/fail/both_borrows/aliasing_mut2.stack.stderr index e70e5b1079..5c574f13ff 100644 --- a/tests/fail/both_borrows/aliasing_mut2.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut2.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn safe(x: &i32, y: &mut i32) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + | +LL | fn safe(x: &i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); diff --git a/tests/fail/both_borrows/aliasing_mut2.tree.stderr b/tests/fail/both_borrows/aliasing_mut2.tree.stderr index aed59b21f1..639a4ef57e 100644 --- a/tests/fail/both_borrows/aliasing_mut2.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut2.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | let _v = *x; | ^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + | +LL | fn safe(x: &i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); diff --git a/tests/fail/both_borrows/aliasing_mut3.stack.stderr b/tests/fail/both_borrows/aliasing_mut3.stack.stderr index 9980d14e10..4be06c65f1 100644 --- a/tests/fail/both_borrows/aliasing_mut3.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut3.stack.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique function-ent | LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); diff --git a/tests/fail/both_borrows/aliasing_mut3.tree.stderr b/tests/fail/both_borrows/aliasing_mut3.tree.stderr index 357d7d2201..09a54f8199 100644 --- a/tests/fail/both_borrows/aliasing_mut3.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut3.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | fn safe(x: &mut i32, y: &i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); diff --git a/tests/fail/both_borrows/aliasing_mut4.stack.stderr b/tests/fail/both_borrows/aliasing_mut4.stack.stderr index eb2514df58..e72996d43d 100644 --- a/tests/fail/both_borrows/aliasing_mut4.stack.stderr +++ b/tests/fail/both_borrows/aliasing_mut4.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn safe(x: &i32, y: &mut Cell) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC + | +LL | fn safe(x: &i32, y: &mut Cell) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); diff --git a/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/tests/fail/both_borrows/aliasing_mut4.tree.stderr index c06ae0e921..d2a533a3da 100644 --- a/tests/fail/both_borrows/aliasing_mut4.tree.stderr +++ b/tests/fail/both_borrows/aliasing_mut4.tree.stderr @@ -19,16 +19,19 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn safe(x: &i32, y: &mut Cell) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `std::mem::replace::` at RUSTLIB/core/src/mem/mod.rs:LL:CC - = note: inside `std::cell::Cell::::replace` at RUSTLIB/core/src/cell.rs:LL:CC - = note: inside `std::cell::Cell::::set` at RUSTLIB/core/src/cell.rs:LL:CC -note: inside `safe` +note: error occurred inside `std::mem::replace::` + --> RUSTLIB/core/src/mem/mod.rs:LL:CC + | +LL | pub const fn replace(dest: &mut T, src: T) -> T { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::cell::Cell::::replace` (at RUSTLIB/core/src/cell.rs:LL:CC) + = note: which got called inside `std::cell::Cell::::set` (at RUSTLIB/core/src/cell.rs:LL:CC) +note: which got called inside `safe` --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | y.set(1); | ^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); diff --git a/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr b/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr index 009ec2dd4a..c9341ccdb0 100644 --- a/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr +++ b/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr @@ -16,14 +16,17 @@ help: was later invalidated at offsets [0x0..0x4] by a write access | LL | *our = 5; | ^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC -note: inside `demo_box_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_box_advanced_unique` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); diff --git a/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr b/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr index d4cfab024b..446d283694 100644 --- a/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr +++ b/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr @@ -18,14 +18,17 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC -note: inside `demo_box_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_box_advanced_unique` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); diff --git a/tests/fail/both_borrows/box_noalias_violation.stack.stderr b/tests/fail/both_borrows/box_noalias_violation.stack.stderr index cc6633eb24..1a5662b746 100644 --- a/tests/fail/both_borrows/box_noalias_violation.stack.stderr +++ b/tests/fail/both_borrows/box_noalias_violation.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `test` at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC -note: inside `main` +note: error occurred inside `test` + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + | +LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); diff --git a/tests/fail/both_borrows/box_noalias_violation.tree.stderr b/tests/fail/both_borrows/box_noalias_violation.tree.stderr index 6a1f7761a4..6ec056828f 100644 --- a/tests/fail/both_borrows/box_noalias_violation.tree.stderr +++ b/tests/fail/both_borrows/box_noalias_violation.tree.stderr @@ -25,9 +25,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | *x = 5; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `test` at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC -note: inside `main` +note: error occurred inside `test` + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + | +LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); diff --git a/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr b/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr index c4cb2c7ae4..2b0d5f0799 100644 --- a/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr +++ b/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr @@ -22,9 +22,12 @@ help: was later invalidated at offsets [0x0..0x10] by a Unique retag | LL | from_raw_parts_mut(ptr.offset(mid as isize), len - mid), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `safe::split_at_mut::` at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC -note: inside `main` +note: error occurred inside `safe::split_at_mut::` + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC + | +LL | pub fn split_at_mut(self_: &mut [T], mid: usize) -> (&mut [T], &mut [T]) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | let (a, b) = safe::split_at_mut(&mut array, 0); diff --git a/tests/fail/both_borrows/illegal_write6.stack.stderr b/tests/fail/both_borrows/illegal_write6.stack.stderr index 40b44d77e3..3c09bec03d 100644 --- a/tests/fail/both_borrows/illegal_write6.stack.stderr +++ b/tests/fail/both_borrows/illegal_write6.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { | ^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/illegal_write6.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC + | +LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | foo(x, p); diff --git a/tests/fail/both_borrows/illegal_write6.tree.stderr b/tests/fail/both_borrows/illegal_write6.tree.stderr index 1547a6ca73..69bb914236 100644 --- a/tests/fail/both_borrows/illegal_write6.tree.stderr +++ b/tests/fail/both_borrows/illegal_write6.tree.stderr @@ -25,9 +25,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | *a = 1; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/illegal_write6.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC + | +LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | foo(x, p); diff --git a/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr b/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr index ef531be496..d298d511d3 100644 --- a/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); diff --git a/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr b/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr index 90a89e48e6..b83217bce7 100644 --- a/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr @@ -19,9 +19,12 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); diff --git a/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr b/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr index caf2b702fe..ebbc3a7ae8 100644 --- a/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); diff --git a/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr b/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr index 8bac71dcd4..1a1eb89d25 100644 --- a/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr +++ b/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr @@ -19,9 +19,12 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); diff --git a/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr b/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr index 9927d90c64..2b2e16d1ec 100644 --- a/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr @@ -11,10 +11,13 @@ help: ALLOC was allocated here: | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); diff --git a/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr b/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr index 9927d90c64..2b2e16d1ec 100644 --- a/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr @@ -11,10 +11,13 @@ help: ALLOC was allocated here: | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); diff --git a/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr b/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr index c704085f95..f33b6cf77e 100644 --- a/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr @@ -6,10 +6,9 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) | = 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: - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` + = note: this is inside `std::boxed::Box::::from_raw_in` + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); diff --git a/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr b/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr index c704085f95..f33b6cf77e 100644 --- a/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr +++ b/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr @@ -6,10 +6,9 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) | = 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: - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` + = note: this is inside `std::boxed::Box::::from_raw_in` + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); diff --git a/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr b/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr index 3c8316ca5b..290f50f60c 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr @@ -16,14 +16,17 @@ help: was later invalidated at offsets [0x0..0x4] by a write access | LL | *our = 5; | ^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC -note: inside `demo_mut_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_mut_advanced_unique` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); diff --git a/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr b/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr index f5c1dea69f..608e41341c 100644 --- a/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr +++ b/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr @@ -18,14 +18,17 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC -note: inside `demo_mut_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_mut_advanced_unique` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); diff --git a/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr b/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr index 7cee5fb136..68fd20ba94 100644 --- a/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr +++ b/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr @@ -16,20 +16,23 @@ help: is this argument | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside closure +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr b/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr index aa07ef53b3..f0dffb8f14 100644 --- a/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr +++ b/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr @@ -25,21 +25,24 @@ help: the protected tag later transitioned to Reserved (conflicted) due to LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/tests/fail/both_borrows/newtype_retagging.stack.stderr b/tests/fail/both_borrows/newtype_retagging.stack.stderr index 7bd42fc20c..8f1619bda4 100644 --- a/tests/fail/both_borrows/newtype_retagging.stack.stderr +++ b/tests/fail/both_borrows/newtype_retagging.stack.stderr @@ -16,20 +16,23 @@ help: is this argument | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside closure +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/tests/fail/both_borrows/newtype_retagging.tree.stderr b/tests/fail/both_borrows/newtype_retagging.tree.stderr index c8a72c5917..f7a2d63dc8 100644 --- a/tests/fail/both_borrows/newtype_retagging.tree.stderr +++ b/tests/fail/both_borrows/newtype_retagging.tree.stderr @@ -25,21 +25,24 @@ help: the protected tag later transitioned to Reserved (conflicted) due to LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( 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 d97850d7a4..d1dbdbc67f 100644 --- a/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -14,13 +14,21 @@ LL | let _r = &mut *p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = 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 (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `thread_2` + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | fn thread_2(p: SendPtr) { + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> 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 c1b37f8a9b..47abf74cb8 100644 --- a/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -14,13 +14,21 @@ LL | let _r = &mut *p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = 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 (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `thread_2` + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | fn thread_2(p: SendPtr) { + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> 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/return_invalid_shr.stack.stderr b/tests/fail/both_borrows/return_invalid_shr.stack.stderr index 7c4fe74870..ff99688028 100644 --- a/tests/fail/both_borrows/return_invalid_shr.stack.stderr +++ b/tests/fail/both_borrows/return_invalid_shr.stack.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> &i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/tests/fail/both_borrows/return_invalid_shr.tree.stderr b/tests/fail/both_borrows/return_invalid_shr.tree.stderr index a8e3553aae..598a95dd96 100644 --- a/tests/fail/both_borrows/return_invalid_shr.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> &i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr b/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr index 8411437ea4..d337823011 100644 --- a/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> Option<&i32> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr b/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr index 39da45ad6d..d303cc9b22 100644 --- a/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> Option<&i32> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr b/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr index a7c422aa73..d6063168d3 100644 --- a/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> (&i32,) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr b/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr index 66b03e5790..0c5b05ce1b 100644 --- a/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr +++ b/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> (&i32,) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr b/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr index eed8c0273a..3a05fb151c 100644 --- a/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr @@ -11,14 +11,17 @@ help: was created by a SharedReadOnly retag at offsets [0x0..0x4] | LL | *(x as *const i32 as *mut i32) = 7; | ^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code` at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC -note: inside `foo` +note: error occurred inside `unknown_code` + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + | +LL | fn unknown_code(x: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `foo` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); diff --git a/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr b/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr index d9b75f65f7..8040cfa212 100644 --- a/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr +++ b/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr @@ -12,14 +12,17 @@ help: the accessed tag was created here, in the initial state Frozen | LL | fn unknown_code(x: &i32) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code` at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC -note: inside `foo` +note: error occurred inside `unknown_code` + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + | +LL | fn unknown_code(x: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `foo` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); diff --git a/tests/fail/box-cell-alias.stderr b/tests/fail/box-cell-alias.stderr index 8e1e9370c7..c5ce263ff1 100644 --- a/tests/fail/box-cell-alias.stderr +++ b/tests/fail/box-cell-alias.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x1] by a Unique retag | LL | let res = helper(val, ptr); | ^^^ - = note: BACKTRACE (of the first span): - = note: inside `helper` at tests/fail/box-cell-alias.rs:LL:CC -note: inside `main` +note: error occurred inside `helper` + --> tests/fail/box-cell-alias.rs:LL:CC + | +LL | fn helper(val: Box>, ptr: *const Cell) -> u8 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/box-cell-alias.rs:LL:CC | LL | let res = helper(val, ptr); diff --git a/tests/fail/concurrency/mutex-leak-move-deadlock.rs b/tests/fail/concurrency/mutex-leak-move-deadlock.rs index 9c73f6c03e..5afa6c7170 100644 --- a/tests/fail/concurrency/mutex-leak-move-deadlock.rs +++ b/tests/fail/concurrency/mutex-leak-move-deadlock.rs @@ -4,7 +4,7 @@ //@normalize-stderr-test: "\| +\^+" -> "| ^" //@normalize-stderr-test: "\n *= note:.*" -> "" // On macOS we use chekced pthread mutexes which changes the error -//@normalize-stderr-test: "this thread got stuck here" -> "thread `main` got stuck here" +//@normalize-stderr-test: "a thread got stuck here" -> "thread `main` got stuck here" //@normalize-stderr-test: "a thread deadlocked" -> "the evaluated program deadlocked" use std::mem; use std::sync::Mutex; diff --git a/tests/fail/concurrency/mutex-leak-move-deadlock.stderr b/tests/fail/concurrency/mutex-leak-move-deadlock.stderr index 7784132a54..258f5a823f 100644 --- a/tests/fail/concurrency/mutex-leak-move-deadlock.stderr +++ b/tests/fail/concurrency/mutex-leak-move-deadlock.stderr @@ -2,9 +2,9 @@ error: the evaluated program deadlocked --> RUSTLIB/std/$FILE:LL:CC | LL | $CODE - | ^ thread `main` got stuck here + | ^ thread got stuck here | -note: inside `main` +note: which got called inside `main` --> tests/fail/concurrency/mutex-leak-move-deadlock.rs:LL:CC | LL | $CODE diff --git a/tests/fail/coroutine-pinned-moved.stderr b/tests/fail/coroutine-pinned-moved.stderr index 70ecfa9379..2cc3b845de 100644 --- a/tests/fail/coroutine-pinned-moved.stderr +++ b/tests/fail/coroutine-pinned-moved.stderr @@ -16,15 +16,18 @@ help: ALLOC was deallocated here: | LL | }; // *deallocate* coroutine_iterator | ^ - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/coroutine-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` +note: error occurred inside closure + --> tests/fail/coroutine-pinned-moved.rs:LL:CC + | +LL | static move || { + | ^^^^^^^^^^^^^^ +note: which got called inside ` as std::iter::Iterator>::next` --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ - = note: inside `std::boxed::iter::>>::next` at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC -note: inside `main` + = note: which got called inside `std::boxed::iter::>>::next` (at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC) +note: which got called inside `main` --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | coroutine_iterator_2.next(); // and use moved value diff --git a/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr b/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr index df2b227c80..e5471e094b 100644 --- a/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr +++ b/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr @@ -6,9 +6,8 @@ LL | unsafe { &(*x).0 as *const i32 } | = 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: - = note: inside `via_ref` at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC -note: inside `main` + = note: this is inside `via_ref` +note: which got called inside `main` --> tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC | LL | via_ref(ptr); // this is not diff --git a/tests/fail/dangling_pointers/storage_dead_dangling.stderr b/tests/fail/dangling_pointers/storage_dead_dangling.stderr index 3a3133049b..93bb9603ae 100644 --- a/tests/fail/dangling_pointers/storage_dead_dangling.stderr +++ b/tests/fail/dangling_pointers/storage_dead_dangling.stderr @@ -6,9 +6,8 @@ LL | let _ref = unsafe { &mut *(LEAK as *mut i32) }; | = 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: - = note: inside `evil` at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC -note: inside `main` + = note: this is inside `evil` +note: which got called inside `main` --> tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC | LL | evil(); diff --git a/tests/fail/data_race/alloc_read_race.stderr b/tests/fail/data_race/alloc_read_race.stderr index d4933db2ed..67edbfb465 100644 --- a/tests/fail/data_race/alloc_read_race.stderr +++ b/tests/fail/data_race/alloc_read_race.stderr @@ -11,6 +11,18 @@ LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relax | ^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 da7f5ed869..33c562958e 100644 --- a/tests/fail/data_race/alloc_write_race.stderr +++ b/tests/fail/data_race/alloc_write_race.stderr @@ -11,6 +11,17 @@ LL | .store(Box::into_raw(Box::::new_uninit()) as *mut us | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 203e6a10e4..6f0332e46f 100644 --- a/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -11,6 +11,16 @@ LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 791dc71f99..13f95e8524 100644 --- a/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -11,6 +11,17 @@ LL | atomic_ref.load(Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 73d963875f..0907ed3cd0 100644 --- a/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -11,6 +11,17 @@ LL | atomic_ref.store(32, Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 066fff5e3d..dfc7ed0127 100644 --- a/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -11,6 +11,16 @@ LL | let _val = *(c.0 as *mut usize); | ^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 10b7d8398d..018db8364e 100644 --- a/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -11,6 +11,16 @@ LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 bb854bc423..ef55214486 100644 --- a/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -11,6 +11,17 @@ LL | atomic_ref.store(64, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 8cecfbee9d..da13b62b1c 100644 --- a/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/tests/fail/data_race/dangling_thread_async_race.stderr @@ -11,6 +11,15 @@ LL | *c.0 = 32; | ^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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/dangling_thread_race.stderr b/tests/fail/data_race/dangling_thread_race.stderr index 7260776043..67b254c265 100644 --- a/tests/fail/data_race/dangling_thread_race.stderr +++ b/tests/fail/data_race/dangling_thread_race.stderr @@ -11,6 +11,7 @@ LL | *c.0 = 32; | ^^^^^^^^^ = 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: this is on thread `main` 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 c4200ea961..798c6c490b 100644 --- a/tests/fail/data_race/dealloc_read_race1.stderr +++ b/tests/fail/data_race/dealloc_read_race1.stderr @@ -16,6 +16,18 @@ LL | let _val = *ptr.0; | ^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 5ab5c9655d..4a9e6e832b 100644 --- a/tests/fail/data_race/dealloc_read_race2.stderr +++ b/tests/fail/data_race/dealloc_read_race2.stderr @@ -20,6 +20,16 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ) | |_____________^ + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +... | +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 b52e48827b..8b8cfaf993 100644 --- a/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -11,6 +11,18 @@ LL | *pointer.load(Ordering::Acquire) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | ... }); + | |________^ 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 0a574068d4..18924d7d65 100644 --- a/tests/fail/data_race/dealloc_write_race1.stderr +++ b/tests/fail/data_race/dealloc_write_race1.stderr @@ -16,6 +16,18 @@ LL | *ptr.0 = 2; | ^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 9fbae21eb8..2029e06321 100644 --- a/tests/fail/data_race/dealloc_write_race2.stderr +++ b/tests/fail/data_race/dealloc_write_race2.stderr @@ -20,6 +20,16 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ); | |_____________^ + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +... | +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 0c853ccb8c..3ce6e6ce56 100644 --- a/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -11,6 +11,18 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | ... }); + | |________^ 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 a8eee1241b..f9a18008ab 100644 --- a/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/tests/fail/data_race/enable_after_join_to_main.stderr @@ -11,6 +11,16 @@ LL | *c.0 = 32; | ^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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/fence_after_load.stderr b/tests/fail/data_race/fence_after_load.stderr index bf2ac30a1e..f2098e1d3e 100644 --- a/tests/fail/data_race/fence_after_load.stderr +++ b/tests/fail/data_race/fence_after_load.stderr @@ -11,6 +11,7 @@ LL | unsafe { V = 1 } | ^^^^^ = 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: this is on thread `main` 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 52bd7721ef..6caeacfb5e 100644 --- a/tests/fail/data_race/local_variable_alloc_race.stderr +++ b/tests/fail/data_race/local_variable_alloc_race.stderr @@ -11,6 +11,16 @@ LL | StorageLive(val); | ^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }) + | |______^ 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 969b6faadb..5dfa6917e3 100644 --- a/tests/fail/data_race/local_variable_read_race.stderr +++ b/tests/fail/data_race/local_variable_read_race.stderr @@ -11,6 +11,17 @@ LL | let _val = val; | ^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |______^ 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 0bf7dd28c0..2f9e22f66f 100644 --- a/tests/fail/data_race/local_variable_write_race.stderr +++ b/tests/fail/data_race/local_variable_write_race.stderr @@ -11,6 +11,17 @@ LL | let mut val: u8 = 0; | ^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |______^ 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 087f326053..10b5539a5b 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 @@ -13,6 +13,17 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 66aee703e4..8e37e6161c 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 @@ -13,6 +13,17 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 967fd45c5b..ec86c41cd1 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 @@ -13,6 +13,17 @@ LL | a8[0].load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 7664c3f13e..d4d03b96a3 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 @@ -13,6 +13,17 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 7e30cf6856..9033bc2c92 100644 --- a/tests/fail/data_race/mixed_size_write_write.fst.stderr +++ b/tests/fail/data_race/mixed_size_write_write.fst.stderr @@ -13,6 +13,16 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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: 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 74bb72b986..b0e771c40b 100644 --- a/tests/fail/data_race/mixed_size_write_write.snd.stderr +++ b/tests/fail/data_race/mixed_size_write_write.snd.stderr @@ -13,6 +13,16 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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: 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.stderr b/tests/fail/data_race/mixed_size_write_write.stderr deleted file mode 100644 index 1f22413bc5..0000000000 --- a/tests/fail/data_race/mixed_size_write_write.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: Undefined Behavior: Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC - | -LL | a8[0].store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - | -help: and (1) occurred earlier here - --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC - | -LL | a16.store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: overlapping unsynchronized atomic accesses must use the same access size - = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model - = 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 (of the first span) on thread `unnamed-ID`: - = note: inside closure at tests/fail/data_race/mixed_size_write_write.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/tests/fail/data_race/read_write_race.stderr b/tests/fail/data_race/read_write_race.stderr index ce063d8c53..1922ce949f 100644 --- a/tests/fail/data_race/read_write_race.stderr +++ b/tests/fail/data_race/read_write_race.stderr @@ -11,6 +11,16 @@ LL | let _val = *c.0; | ^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 5ac78a2ecf..a6bdac409d 100644 --- a/tests/fail/data_race/read_write_race_stack.stderr +++ b/tests/fail/data_race/read_write_race_stack.stderr @@ -11,6 +11,17 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/read_write_race_stack.rs:LL:CC + | +LL | ... let j1 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +... | +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 fffde0370a..6c77bf6b3d 100644 --- a/tests/fail/data_race/relax_acquire_race.stderr +++ b/tests/fail/data_race/relax_acquire_race.stderr @@ -11,6 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | ... }); + | |________^ 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 61f5501434..528db7ed24 100644 --- a/tests/fail/data_race/release_seq_race.stderr +++ b/tests/fail/data_race/release_seq_race.stderr @@ -11,6 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | }); + | |__________^ 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 2c28ee03e7..1b2daf8b25 100644 --- a/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -11,6 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | ... }); + | |________^ 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 04621ff07b..21f710e16b 100644 --- a/tests/fail/data_race/rmw_race.stderr +++ b/tests/fail/data_race/rmw_race.stderr @@ -11,6 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/data_race/stack_pop_race.stderr b/tests/fail/data_race/stack_pop_race.stderr index 130a31ebee..c543bcf111 100644 --- a/tests/fail/data_race/stack_pop_race.stderr +++ b/tests/fail/data_race/stack_pop_race.stderr @@ -11,6 +11,7 @@ LL | let _val = unsafe { *ptr.0 }; | ^^^^^^ = 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: this is on thread `main` 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 03bee0060a..112cdb2781 100644 --- a/tests/fail/data_race/write_write_race.stderr +++ b/tests/fail/data_race/write_write_race.stderr @@ -11,6 +11,16 @@ LL | *c.0 = 32; | ^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 cb2faf4ac2..c70dbb4e61 100644 --- a/tests/fail/data_race/write_write_race_stack.stderr +++ b/tests/fail/data_race/write_write_race_stack.stderr @@ -11,6 +11,17 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/write_write_race_stack.rs:LL:CC + | +LL | let j1 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +... | +LL | | stack_var +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr b/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr index f3ec20837d..068d4b4f13 100644 --- a/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr +++ b/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr @@ -6,9 +6,8 @@ LL | SetDiscriminant(*ptr, 1); | = 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: - = note: inside `set_discriminant` at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC -note: inside `main` + = note: this is inside `set_discriminant` +note: which got called inside `main` --> tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC | LL | set_discriminant(&mut v); diff --git a/tests/fail/function_calls/arg_inplace_mutate.stack.stderr b/tests/fail/function_calls/arg_inplace_mutate.stack.stderr index 8a454bedb2..f45f5c26ba 100644 --- a/tests/fail/function_calls/arg_inplace_mutate.stack.stderr +++ b/tests/fail/function_calls/arg_inplace_mutate.stack.stderr @@ -21,9 +21,12 @@ help: is this argument | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `callee` at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC -note: inside `main` +note: error occurred inside `callee` + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + | +LL | fn callee(x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/arg_inplace_mutate.tree.stderr b/tests/fail/function_calls/arg_inplace_mutate.tree.stderr index 74706d6b9f..044026ee8d 100644 --- a/tests/fail/function_calls/arg_inplace_mutate.tree.stderr +++ b/tests/fail/function_calls/arg_inplace_mutate.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `callee` at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC -note: inside `main` +note: error occurred inside `callee` + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + | +LL | fn callee(x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/arg_inplace_observe_during.none.stderr b/tests/fail/function_calls/arg_inplace_observe_during.none.stderr index 09a5b9a649..b66d13cede 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.none.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.none.stderr @@ -6,9 +6,8 @@ LL | unsafe { ptr.read() }; | = 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: - = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC -note: inside `main` + = note: this is inside `change_arg` +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr b/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr index 609599ef6c..9dc9adc13a 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr @@ -21,9 +21,12 @@ help: is this argument | LL | x.0 = 0; | ^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC -note: inside `main` +note: error occurred inside `change_arg` + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + | +LL | fn change_arg(mut x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr b/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr index c8c0e5c37e..0a6c6e615a 100644 --- a/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr +++ b/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | x.0 = 0; | ^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC -note: inside `main` +note: error occurred inside `change_arg` + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + | +LL | fn change_arg(mut x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index 95f79aae6c..dd7f52d03f 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -14,21 +14,20 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `nounwind` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `nounwind` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | / extern "C-unwind" fn nounwind() { LL | | panic!(); LL | | } | |_^ -note: inside `main` +note: which got called inside `main` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } diff --git a/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index 95f79aae6c..dd7f52d03f 100644 --- a/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -14,21 +14,20 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `nounwind` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `nounwind` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | / extern "C-unwind" fn nounwind() { LL | | panic!(); LL | | } | |_^ -note: inside `main` +note: which got called inside `main` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr index d478568cea..32e80ed0e6 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr @@ -6,9 +6,8 @@ LL | unsafe { ptr.read() }; | = 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: - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC -note: inside `main` + = note: this is inside `myfun` +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr index 86adbab353..14c8e5cb89 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr @@ -21,9 +21,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr index b43e19c390..2e5b687f90 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr b/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr index faae6172d7..63dee06563 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr @@ -21,9 +21,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr index deefb24b78..80c111d4dd 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr index 1a18857bb1..a612945153 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr @@ -21,9 +21,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | become myfun2(ptr) | ^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `myfun2` at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun2` + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + | +LL | fn myfun2(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr index 76ccf39744..a6fff1c266 100644 --- a/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr +++ b/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `myfun2` at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun2` + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + | +LL | fn myfun2(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/tests/fail/function_calls/simd_feature_flag_difference.stderr b/tests/fail/function_calls/simd_feature_flag_difference.stderr index 755bc3e7c2..ef6decaece 100644 --- a/tests/fail/function_calls/simd_feature_flag_difference.stderr +++ b/tests/fail/function_calls/simd_feature_flag_difference.stderr @@ -6,9 +6,8 @@ LL | unsafe { foo(0.0, x) } | = 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: - = note: inside `bar` at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC -note: inside `main` + = note: this is inside `bar` +note: which got called inside `main` --> tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC | LL | let copy = bar(input); diff --git a/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr b/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr index 1e7f500edb..697e35a660 100644 --- a/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr +++ b/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr @@ -6,9 +6,8 @@ LL | RET = PtrMetadata(*p); | = 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: - = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC -note: inside `main` + = note: this is inside `deref_meta` +note: which got called inside `main` --> tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr().cast()); diff --git a/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr b/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr index d284a6f6d0..ba711710b4 100644 --- a/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr +++ b/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr @@ -18,9 +18,8 @@ LL | RET = PtrMetadata(*p); | = 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: - = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC -note: inside `main` + = note: this is inside `deref_meta` +note: which got called inside `main` --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr().cast()); diff --git a/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr b/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr index 7a1f3d6ea8..104e281f2a 100644 --- a/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr +++ b/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr @@ -6,9 +6,8 @@ LL | RET = PtrMetadata(*p); | = 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: - = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC -note: inside `main` + = note: this is inside `deref_meta` +note: which got called inside `main` --> tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr()); diff --git a/tests/fail/intrinsics/typed-swap-invalid-array.stderr b/tests/fail/intrinsics/typed-swap-invalid-array.stderr index 7db7958299..619925f289 100644 --- a/tests/fail/intrinsics/typed-swap-invalid-array.stderr +++ b/tests/fail/intrinsics/typed-swap-invalid-array.stderr @@ -6,9 +6,8 @@ LL | typed_swap_nonoverlapping(a, b); | = 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: - = note: inside `invalid_array` at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC -note: inside `main` + = note: this is inside `invalid_array` +note: which got called inside `main` --> tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC | LL | invalid_array(); diff --git a/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr b/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr index 7edf72205d..42bea7dd5e 100644 --- a/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr +++ b/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr @@ -6,9 +6,8 @@ LL | typed_swap_nonoverlapping(a, b); | = 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: - = note: inside `invalid_scalar` at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC -note: inside `main` + = note: this is inside `invalid_scalar` +note: which got called inside `main` --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC | LL | invalid_scalar(); diff --git a/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr b/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr index aece0b6cb9..13e8c7f9c5 100644 --- a/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr +++ b/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr @@ -6,9 +6,8 @@ LL | typed_swap_nonoverlapping(a, b); | = 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: - = note: inside `invalid_scalar` at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC -note: inside `main` + = note: this is inside `invalid_scalar` +note: which got called inside `main` --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC | LL | invalid_scalar(); diff --git a/tests/fail/issue-miri-1112.stderr b/tests/fail/issue-miri-1112.stderr index 98f04ff1af..0fc67c6d4f 100644 --- a/tests/fail/issue-miri-1112.stderr +++ b/tests/fail/issue-miri-1112.stderr @@ -6,9 +6,8 @@ LL | let obj = std::mem::transmute::(obj) | = 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: - = note: inside `FunnyPointer::from_data_ptr` at tests/fail/issue-miri-1112.rs:LL:CC -note: inside `main` + = note: this is inside `FunnyPointer::from_data_ptr` +note: which got called inside `main` --> tests/fail/issue-miri-1112.rs:LL:CC | LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _); diff --git a/tests/fail/memleak_rc.stderr b/tests/fail/memleak_rc.stderr index df12eeed6a..f7b0950ef6 100644 --- a/tests/fail/memleak_rc.stderr +++ b/tests/fail/memleak_rc.stderr @@ -4,9 +4,8 @@ error: memory leaked: ALLOC (Rust heap, SIZE, ALIGN), allocated here: LL | Box::leak(Box::new(RcInner { strong: Cell::new(1), weak: Cell::new(1), value })) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: BACKTRACE: - = note: inside `std::rc::Rc::>>::new` at RUSTLIB/alloc/src/rc.rs:LL:CC -note: inside `main` + = note: this is inside `std::rc::Rc::>>::new` +note: which got called inside `main` --> tests/fail/memleak_rc.rs:LL:CC | LL | let x = Dummy(Rc::new(RefCell::new(None))); diff --git a/tests/fail/never_transmute_void.stderr b/tests/fail/never_transmute_void.stderr index 10ef783f22..a236d17c49 100644 --- a/tests/fail/never_transmute_void.stderr +++ b/tests/fail/never_transmute_void.stderr @@ -6,9 +6,8 @@ LL | match v.0 {} | = 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: - = note: inside `m::f` at tests/fail/never_transmute_void.rs:LL:CC -note: inside `main` + = note: this is inside `m::f` +note: which got called inside `main` --> tests/fail/never_transmute_void.rs:LL:CC | LL | m::f(v); diff --git a/tests/fail/overlapping_assignment.stderr b/tests/fail/overlapping_assignment.stderr index a479e8be64..6bf7fa4465 100644 --- a/tests/fail/overlapping_assignment.stderr +++ b/tests/fail/overlapping_assignment.stderr @@ -6,9 +6,8 @@ LL | *ptr1 = *ptr2; | = 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: - = note: inside `self_copy` at tests/fail/overlapping_assignment.rs:LL:CC -note: inside `main` + = note: this is inside `self_copy` +note: which got called inside `main` --> tests/fail/overlapping_assignment.rs:LL:CC | LL | self_copy(ptr, ptr); diff --git a/tests/fail/panic/abort_unwind.stderr b/tests/fail/panic/abort_unwind.stderr index 23dbc2fb8f..1f45211c5e 100644 --- a/tests/fail/panic/abort_unwind.stderr +++ b/tests/fail/panic/abort_unwind.stderr @@ -14,15 +14,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `std::panic::abort_unwind::<{closure@tests/fail/panic/abort_unwind.rs:LL:CC}, ()>` at RUSTLIB/core/src/panic.rs:LL:CC -note: inside `main` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::abort_unwind::<{closure@tests/fail/panic/abort_unwind.rs:LL:CC}, ()>` (at RUSTLIB/core/src/panic.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/abort_unwind.rs:LL:CC | LL | std::panic::abort_unwind(|| panic!("PANIC!!!")); diff --git a/tests/fail/panic/bad_unwind.stderr b/tests/fail/panic/bad_unwind.stderr index b0a8492b6a..06e019bb69 100644 --- a/tests/fail/panic/bad_unwind.stderr +++ b/tests/fail/panic/bad_unwind.stderr @@ -11,12 +11,11 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); | = 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: - = note: inside closure at tests/fail/panic/bad_unwind.rs:LL:CC - = note: inside `std::panicking::catch_unwind::do_call::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::catch_unwind::<(), {closure@tests/fail/panic/bad_unwind.rs:LL:CC}>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panic.rs:LL:CC -note: inside `main` + = note: this is inside closure + = note: which got called inside `std::panicking::catch_unwind::do_call::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::<(), {closure@tests/fail/panic/bad_unwind.rs:LL:CC}>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::catch_unwind::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` (at RUSTLIB/std/src/panic.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/bad_unwind.rs:LL:CC | LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); diff --git a/tests/fail/panic/double_panic.stderr b/tests/fail/panic/double_panic.stderr index edbc0d8fc5..4beadb6aa6 100644 --- a/tests/fail/panic/double_panic.stderr +++ b/tests/fail/panic/double_panic.stderr @@ -17,14 +17,13 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind_nobacktrace` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_in_cleanup` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind_nobacktrace` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_in_cleanup` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/double_panic.rs:LL:CC | LL | / fn main() { diff --git a/tests/fail/panic/no_std.stderr b/tests/fail/panic/no_std.stderr index dbd29e4306..128dfddc21 100644 --- a/tests/fail/panic/no_std.stderr +++ b/tests/fail/panic/no_std.stderr @@ -6,9 +6,8 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `panic_handler` at tests/fail/panic/no_std.rs:LL:CC -note: inside `miri_start` + = note: this is inside `panic_handler` +note: which got called inside `miri_start` --> tests/fail/panic/no_std.rs:LL:CC | LL | panic!("blarg I am dead") diff --git a/tests/fail/panic/panic_abort1.stderr b/tests/fail/panic/panic_abort1.stderr index c389a9bc07..57c8ee843b 100644 --- a/tests/fail/panic/panic_abort1.stderr +++ b/tests/fail/panic/panic_abort1.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort1.rs:LL:CC | LL | std::panic!("panicking from libstd"); diff --git a/tests/fail/panic/panic_abort2.stderr b/tests/fail/panic/panic_abort2.stderr index 5fe2245cbe..7c145634a1 100644 --- a/tests/fail/panic/panic_abort2.stderr +++ b/tests/fail/panic/panic_abort2.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort2.rs:LL:CC | LL | std::panic!("{}-panicking from libstd", 42); diff --git a/tests/fail/panic/panic_abort3.stderr b/tests/fail/panic/panic_abort3.stderr index cac24ca41c..71877122b6 100644 --- a/tests/fail/panic/panic_abort3.stderr +++ b/tests/fail/panic/panic_abort3.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort3.rs:LL:CC | LL | core::panic!("panicking from libcore"); diff --git a/tests/fail/panic/panic_abort4.stderr b/tests/fail/panic/panic_abort4.stderr index 21195729ae..2b4c6bea56 100644 --- a/tests/fail/panic/panic_abort4.stderr +++ b/tests/fail/panic/panic_abort4.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort4.rs:LL:CC | LL | core::panic!("{}-panicking from libcore", 42); diff --git a/tests/fail/provenance/provenance_transmute.stderr b/tests/fail/provenance/provenance_transmute.stderr index 013c39a224..6af86ffdb2 100644 --- a/tests/fail/provenance/provenance_transmute.stderr +++ b/tests/fail/provenance/provenance_transmute.stderr @@ -6,9 +6,8 @@ LL | let _val = *left_ptr; | = 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: - = note: inside `deref` at tests/fail/provenance/provenance_transmute.rs:LL:CC -note: inside `main` + = note: this is inside `deref` +note: which got called inside `main` --> tests/fail/provenance/provenance_transmute.rs:LL:CC | LL | deref(ptr1, ptr2.with_addr(ptr1.addr())); diff --git a/tests/fail/ptr_swap_nonoverlapping.stderr b/tests/fail/ptr_swap_nonoverlapping.stderr index c5f6e62b86..7fc54636b5 100644 --- a/tests/fail/ptr_swap_nonoverlapping.stderr +++ b/tests/fail/ptr_swap_nonoverlapping.stderr @@ -12,12 +12,11 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC | LL | std::ptr::swap_nonoverlapping(ptr, ptr, 1); diff --git a/tests/fail/shims/ctor_ub.rs b/tests/fail/shims/ctor_ub.rs new file mode 100644 index 0000000000..860f602e69 --- /dev/null +++ b/tests/fail/shims/ctor_ub.rs @@ -0,0 +1,39 @@ +unsafe extern "C" fn ctor() { + std::hint::unreachable_unchecked() + //~^ERROR: unreachable +} + +#[rustfmt::skip] +macro_rules! ctor { + ($ident:ident = $ctor:ident) => { + #[cfg_attr( + all(any( + target_os = "linux", + target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "haiku", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", + target_os = "solaris", + target_os = "none", + target_family = "wasm", + )), + link_section = ".init_array" + )] + #[cfg_attr(windows, link_section = ".CRT$XCU")] + #[cfg_attr( + any(target_os = "macos", target_os = "ios"), + // We do not set the `mod_init_funcs` flag here since ctor/inventory also do not do + // that. See . + link_section = "__DATA,__mod_init_func" + )] + #[used] + static $ident: unsafe extern "C" fn() = $ctor; + }; +} + +ctor! { CTOR = ctor } + +fn main() {} diff --git a/tests/fail/shims/ctor_ub.stderr b/tests/fail/shims/ctor_ub.stderr new file mode 100644 index 0000000000..ab8a8f6336 --- /dev/null +++ b/tests/fail/shims/ctor_ub.stderr @@ -0,0 +1,23 @@ +error: Undefined Behavior: entering unreachable code + --> tests/fail/shims/ctor_ub.rs:LL:CC + | +LL | std::hint::unreachable_unchecked() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | + = 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: this is inside `ctor` +note: which got called indirectly due to this code + --> tests/fail/shims/ctor_ub.rs:LL:CC + | +LL | static $ident: unsafe extern "C" fn() = $ctor; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | ctor! { CTOR = ctor } + | --------------------- in this macro invocation + = note: this error originates in the macro `ctor` (in Nightly builds, run with -Z macro-backtrace for more info) + +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace + +error: aborting due to 1 previous error + diff --git a/tests/fail/shims/fs/isolated_file.stderr b/tests/fail/shims/fs/isolated_file.stderr index f08909d442..eb7f70a351 100644 --- a/tests/fail/shims/fs/isolated_file.stderr +++ b/tests/fail/shims/fs/isolated_file.stderr @@ -6,19 +6,18 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a | = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning - = note: BACKTRACE: - = note: inside closure at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::cvt_r::` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC - = note: inside `std::sys::fs::PLATFORM::File::open_c` at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::fs::PLATFORM::File::open` at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC - = note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC - = note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC -note: inside `main` + = note: this is inside closure + = note: which got called inside `std::sys::pal::PLATFORM::cvt_r::` (at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC) + = note: which got called inside `std::sys::fs::PLATFORM::File::open_c` (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) + = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) + = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) + = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) + = note: which got called inside `std::sys::fs::PLATFORM::File::open` (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) + = note: which got called inside `std::fs::OpenOptions::_open` (at RUSTLIB/std/src/fs.rs:LL:CC) + = note: which got called inside `std::fs::OpenOptions::open::<&std::path::Path>` (at RUSTLIB/std/src/fs.rs:LL:CC) + = note: which got called inside `std::fs::File::open::<&str>` (at RUSTLIB/std/src/fs.rs:LL:CC) +note: which got called inside `main` --> tests/fail/shims/fs/isolated_file.rs:LL:CC | LL | let _file = std::fs::File::open("file.txt").unwrap(); diff --git a/tests/fail/shims/isolated_stdin.stderr b/tests/fail/shims/isolated_stdin.stderr index 5fda90b46e..58f0957a66 100644 --- a/tests/fail/shims/isolated_stdin.stderr +++ b/tests/fail/shims/isolated_stdin.stderr @@ -5,7 +5,7 @@ error: unsupported operation: `read` from stdin not available when isolation is | = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning -note: inside `main` +note: which got called inside `main` --> tests/fail/shims/isolated_stdin.rs:LL:CC | | ^ diff --git a/tests/fail/stacked_borrows/deallocate_against_protector1.stderr b/tests/fail/stacked_borrows/deallocate_against_protector1.stderr index 8d18e5a7d6..84051e688a 100644 --- a/tests/fail/stacked_borrows/deallocate_against_protector1.stderr +++ b/tests/fail/stacked_borrows/deallocate_against_protector1.stderr @@ -6,22 +6,21 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information - = note: BACKTRACE: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure + = note: this is inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` + = note: which got called inside `<{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) +note: which got called inside `inner` --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | f(x) | ^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |x| { diff --git a/tests/fail/stacked_borrows/drop_in_place_protector.stderr b/tests/fail/stacked_borrows/drop_in_place_protector.stderr index 464c44802e..7f4899bb0d 100644 --- a/tests/fail/stacked_borrows/drop_in_place_protector.stderr +++ b/tests/fail/stacked_borrows/drop_in_place_protector.stderr @@ -16,11 +16,14 @@ help: is this argument | LL | core::ptr::drop_in_place(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `::drop` at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC - = note: inside `std::ptr::drop_in_place:: - shim(Some(HasDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` +note: error occurred inside `::drop` + --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place:: - shim(Some(HasDrop))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) +note: which got called inside `main` --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC | LL | core::ptr::drop_in_place(x); diff --git a/tests/fail/stacked_borrows/drop_in_place_retag.stderr b/tests/fail/stacked_borrows/drop_in_place_retag.stderr index e586d3f039..11b3e49b85 100644 --- a/tests/fail/stacked_borrows/drop_in_place_retag.stderr +++ b/tests/fail/stacked_borrows/drop_in_place_retag.stderr @@ -13,9 +13,14 @@ help: was created by a SharedReadOnly retag at offsets [0x0..0x1] | LL | let x = core::ptr::addr_of!(x); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `std::ptr::drop_in_place:: - shim(None)` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` +note: error occurred inside `std::ptr::drop_in_place:: - shim(None)` + --> RUSTLIB/core/src/ptr/mod.rs:LL:CC + | +LL | / pub const unsafe fn drop_in_place(to_drop: *mut T) +LL | | where +LL | | T: [const] Destruct, + | |________________________^ +note: which got called inside `main` --> tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC | LL | core::ptr::drop_in_place(x.cast_mut()); diff --git a/tests/fail/stacked_borrows/invalidate_against_protector1.stderr b/tests/fail/stacked_borrows/invalidate_against_protector1.stderr index b082abe7b2..17abcf0a46 100644 --- a/tests/fail/stacked_borrows/invalidate_against_protector1.stderr +++ b/tests/fail/stacked_borrows/invalidate_against_protector1.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &mut i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC | LL | inner(xraw, xref); diff --git a/tests/fail/stacked_borrows/pointer_smuggling.stderr b/tests/fail/stacked_borrows/pointer_smuggling.stderr index b07599a500..a13ff30ded 100644 --- a/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x1] by a write access | LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created. | ^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `fun2` at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC -note: inside `main` +note: error occurred inside `fun2` + --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC + | +LL | fn fun2() { + | ^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | fun2(); // if they now use a raw ptr they break our reference 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 5b8f77600c..f50b05712e 100644 --- a/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr @@ -14,6 +14,18 @@ LL | unsafe { ptr.0.read() }; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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.stack.stderr b/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr deleted file mode 100644 index 1d7ea18982..0000000000 --- a/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `unnamed-ID` and (2) Write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/retag_data_race_read.rs:LL:CC - | -LL | *p = 5; - | ^^^^^^ Data race detected between (1) Read on thread `unnamed-ID` and (2) Write on thread `unnamed-ID` at ALLOC. (2) just happened here - | -help: and (1) occurred earlier here - --> $DIR/retag_data_race_read.rs:LL:CC - | -LL | let _r = &*p; - | ^^^ - = 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 (of the first span): - = note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC -note: inside closure - --> $DIR/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 - -error: aborting due to 1 previous error - diff --git a/tests/fail/stacked_borrows/retag_data_race_read.stderr b/tests/fail/stacked_borrows/retag_data_race_read.stderr index ee82bbbb1e..67b1cdab91 100644 --- a/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -14,13 +14,21 @@ LL | let _r = &*p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = 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 (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `thread_2` + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC + | +LL | fn thread_2(p: SendPtr) { + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> 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/stacked_borrows/retag_data_race_read.tree.stderr b/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr deleted file mode 100644 index e6c1745d32..0000000000 --- a/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: Undefined Behavior: reborrow through (root of the allocation) is forbidden - --> RUSTLIB/std/src/rt.rs:LL:CC - | -LL | panic::catch_unwind(move || unsafe { init(argc, argv, sigpipe) }).map_err(rt_abort)?; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow through (root of the allocation) is forbidden - | - = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental - = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) - = help: this reborrow (acting as a foreign read access) would cause the protected tag (currently Active) to become Disabled - = help: protected tags must never be Disabled -help: the accessed tag was created here - --> RUSTLIB/std/src/rt.rs:LL:CC - | -LL | panic::catch_unwind(move || unsafe { init(argc, argv, sigpipe) }).map_err(rt_abort)?; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: the protected tag was created here, in the initial state Active - --> RUSTLIB/std/src/panic.rs:LL:CC - | -LL | fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { - | ^ - = note: BACKTRACE (of the first span): - = note: inside `std::rt::lang_start_internal` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::rt::lang_start::<()>` at RUSTLIB/std/src/rt.rs:LL:CC - -error: aborting due to 1 previous error - diff --git a/tests/fail/stacked_borrows/return_invalid_mut.stderr b/tests/fail/stacked_borrows/return_invalid_mut.stderr index 4ac82192a9..9148f5ae81 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> &mut i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/tests/fail/stacked_borrows/return_invalid_mut_option.stderr b/tests/fail/stacked_borrows/return_invalid_mut_option.stderr index 7e7670e49f..6cce7f9f24 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut_option.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut_option.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> Option<&mut i32> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr b/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr index aeaa694d29..37d18f122b 100644 --- a/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr +++ b/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> (&mut i32,) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/tests/fail/tail_calls/cc-mismatch.stderr b/tests/fail/tail_calls/cc-mismatch.stderr index 61a57a6411..00dd2999f5 100644 --- a/tests/fail/tail_calls/cc-mismatch.stderr +++ b/tests/fail/tail_calls/cc-mismatch.stderr @@ -6,20 +6,19 @@ LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output; | = 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: - = note: inside `>::call_once - shim(fn())` at RUSTLIB/core/src/ops/function.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_begin_short_backtrace::` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::ops::function::impls:: for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once` at RUSTLIB/core/src/ops/function.rs:LL:CC - = note: inside `std::panicking::catch_unwind::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::catch_unwind:: i32 + std::marker::Sync + std::panic::RefUnwindSafe>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at RUSTLIB/std/src/panic.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::panicking::catch_unwind::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::catch_unwind::` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at RUSTLIB/std/src/panic.rs:LL:CC - = note: inside `std::rt::lang_start_internal` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::rt::lang_start::<()>` at RUSTLIB/std/src/rt.rs:LL:CC + = note: this is inside `>::call_once - shim(fn())` + = note: which got called inside `std::sys::backtrace::__rust_begin_short_backtrace::` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: which got called inside `std::ops::function::impls:: for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once` (at RUSTLIB/core/src/ops/function.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind:: i32 + std::marker::Sync + std::panic::RefUnwindSafe>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` (at RUSTLIB/std/src/panic.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` (at RUSTLIB/std/src/panic.rs:LL:CC) + = note: which got called inside `std::rt::lang_start_internal` (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: which got called inside `std::rt::lang_start::<()>` (at RUSTLIB/std/src/rt.rs:LL:CC) error: aborting due to 1 previous error diff --git a/tests/fail/tail_calls/dangling-local-var.stderr b/tests/fail/tail_calls/dangling-local-var.stderr index 965dd5b399..a48673fb4b 100644 --- a/tests/fail/tail_calls/dangling-local-var.stderr +++ b/tests/fail/tail_calls/dangling-local-var.stderr @@ -16,9 +16,12 @@ help: ALLOC was deallocated here: | LL | f(std::ptr::null()); | ^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `g` at tests/fail/tail_calls/dangling-local-var.rs:LL:CC -note: inside `main` +note: error occurred inside `g` + --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC + | +LL | fn g(x: *const i32) { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC | LL | f(std::ptr::null()); diff --git a/tests/fail/terminate-terminator.stderr b/tests/fail/terminate-terminator.stderr index 8ae649a392..7d8ae128b5 100644 --- a/tests/fail/terminate-terminator.stderr +++ b/tests/fail/terminate-terminator.stderr @@ -16,14 +16,13 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `has_cleanup` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `has_cleanup` --> tests/fail/terminate-terminator.rs:LL:CC | LL | / fn has_cleanup() { @@ -31,12 +30,12 @@ LL | | let _f = Foo; LL | | panic!(); LL | | } | |_^ -note: inside `panic_abort` +note: which got called inside `panic_abort` --> tests/fail/terminate-terminator.rs:LL:CC | LL | has_cleanup(); | ^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/terminate-terminator.rs:LL:CC | LL | panic_abort(); diff --git a/tests/fail/tls/tls_static_dealloc.stderr b/tests/fail/tls/tls_static_dealloc.stderr index db113b6cf4..efc4bead41 100644 --- a/tests/fail/tls/tls_static_dealloc.stderr +++ b/tests/fail/tls/tls_static_dealloc.stderr @@ -6,6 +6,7 @@ LL | let _val = *dangling_ptr.0; | = 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: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tls_macro_leak.stderr b/tests/fail/tls_macro_leak.stderr index 512932b3cb..c3029bb5b4 100644 --- a/tests/fail/tls_macro_leak.stderr +++ b/tests/fail/tls_macro_leak.stderr @@ -4,11 +4,10 @@ error: memory leaked: ALLOC (Rust heap, size: 4, align: 4), allocated here: LL | cell.set(Some(Box::leak(Box::new(123)))); | ^^^^^^^^^^^^^ | - = note: BACKTRACE: - = note: inside closure at tests/fail/tls_macro_leak.rs:LL:CC - = note: inside `std::thread::LocalKey::>>::try_with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC - = note: inside `std::thread::LocalKey::>>::with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC -note: inside closure + = note: this is inside closure + = note: which got called inside `std::thread::LocalKey::>>::try_with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` (at RUSTLIB/std/src/thread/local.rs:LL:CC) + = note: which got called inside `std::thread::LocalKey::>>::with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` (at RUSTLIB/std/src/thread/local.rs:LL:CC) +note: which got called inside closure --> tests/fail/tls_macro_leak.rs:LL:CC | LL | / TLS.with(|cell| { diff --git a/tests/fail/tree_borrows/outside-range.stderr b/tests/fail/tree_borrows/outside-range.stderr index 7960f42faa..e504f8dde7 100644 --- a/tests/fail/tree_borrows/outside-range.stderr +++ b/tests/fail/tree_borrows/outside-range.stderr @@ -19,9 +19,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `stuff` at tests/fail/tree_borrows/outside-range.rs:LL:CC -note: inside `main` +note: error occurred inside `stuff` + --> tests/fail/tree_borrows/outside-range.rs:LL:CC + | +LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/outside-range.rs:LL:CC | LL | stuff(&mut *raw, raw); diff --git a/tests/fail/tree_borrows/pass_invalid_mut.stderr b/tests/fail/tree_borrows/pass_invalid_mut.stderr index 9a70d248aa..48527fedcc 100644 --- a/tests/fail/tree_borrows/pass_invalid_mut.stderr +++ b/tests/fail/tree_borrows/pass_invalid_mut.stderr @@ -30,9 +30,12 @@ help: the conflicting tag later transitioned to Frozen due to a foreign re LL | let _val = unsafe { *xraw }; // invalidate xref for writing | ^^^^^ = help: this transition corresponds to a loss of write permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC + | +LL | fn foo(nope: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | foo(xref); diff --git a/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr b/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr index 012d7caef5..40a3989c2d 100644 --- a/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr +++ b/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | do_something(*orig_ptr); | ^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `access_after_sub_1` at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC -note: inside `main` +note: error occurred inside `access_after_sub_1` + --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC + | +LL | unsafe fn access_after_sub_1(x: &mut u8, orig_ptr: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC | LL | access_after_sub_1(&mut *(foo as *mut u8).byte_add(1), orig_ptr); diff --git a/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index b1c3ffe86e..8effbe30dd 100644 --- a/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -29,9 +29,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `main::write_second` at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC -note: inside `main` +note: error occurred inside `main::write_second` + --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC + | +LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC | LL | write_second(x, y); diff --git a/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/tests/fail/tree_borrows/reserved/int-protected-write.stderr index 5f3129b9dc..1bc337eb1e 100644 --- a/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -29,9 +29,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `main::write_second` at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC -note: inside `main` +note: error occurred inside `main::write_second` + --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC + | +LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC | LL | write_second(x, y); diff --git a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index 15365e5c8b..3567340f22 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -32,6 +32,19 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *x = 64; | ^^^^^^^ = help: this transition corresponds to a loss of read and write permissions + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 4065c82286..a28730abd9 100644 --- a/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -32,6 +32,19 @@ help: the accessed tag later transitioned to Disabled due to a protector r LL | } | ^ = help: this transition corresponds to a loss of read and write permissions + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> 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 8f2534d6b6..9e20ec238e 100644 --- a/tests/fail/tree_borrows/spurious_read.stderr +++ b/tests/fail/tree_borrows/spurious_read.stderr @@ -31,13 +31,28 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | } | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` at tests/fail/tree_borrows/spurious_read.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC + | +LL | fn as_mut(y: &mut u8, b: (usize, Arc)) -> *mut u8 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called indirectly due to this code + --> 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: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/fail/tree_borrows/strongly-protected.stderr b/tests/fail/tree_borrows/strongly-protected.stderr index 685abee329..9545ebf39a 100644 --- a/tests/fail/tree_borrows/strongly-protected.stderr +++ b/tests/fail/tree_borrows/strongly-protected.stderr @@ -18,22 +18,25 @@ help: the strongly protected tag was created here, in the initial state Re | LL | fn inner(x: &mut i32, f: fn(*mut i32)) { | ^ - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` + = note: which got called inside `<{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) +note: which got called inside `inner` --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | f(x) | ^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |raw| { diff --git a/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr b/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr index b98d2fafcf..3db6dab316 100644 --- a/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr +++ b/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr @@ -18,9 +18,12 @@ help: the conflicting tag was created here, in the initial state Frozen | LL | let intermediary = &root; | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `write_to_mut` at tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC -note: inside `main` +note: error occurred inside `write_to_mut` + --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC + | +LL | fn write_to_mut(m: &mut u8, other_ptr: *const u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC | LL | write_to_mut(data, core::ptr::addr_of!(root)); diff --git a/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr b/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr index e257a3511f..d61fe47a87 100644 --- a/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr +++ b/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr @@ -23,9 +23,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | let mut protect = |_arg: &mut u32| { | ^^^^ - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC -note: inside `main` +note: error occurred inside closure + --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC + | +LL | let mut protect = |_arg: &mut u32| { + | ^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC | LL | protect(wild_ref); diff --git a/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr b/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr index 5486eee4f0..cd797cdc0c 100644 --- a/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr +++ b/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr @@ -7,9 +7,8 @@ LL | unsafe { *wild = 4 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: there are no exposed tags which may perform this access here - = note: BACKTRACE: - = note: inside closure at tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC -note: inside `main` + = note: this is inside closure +note: which got called inside `main` --> tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC | LL | protect(ref1); diff --git a/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr b/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr index 6e115b22fe..bcc6b5f5b8 100644 --- a/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr +++ b/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr @@ -18,22 +18,25 @@ help: the strongly protected tag was created here, in the initial state Re | LL | fn inner(x: &mut i32, f: fn(usize)) { | ^ - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw as *mut i32) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC} as std::ops::FnOnce<(usize,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` + = note: which got called inside `<{closure@tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC} as std::ops::FnOnce<(usize,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) +note: which got called inside `inner` --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC | LL | f(x as *mut i32 as usize) | ^^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |raw| { diff --git a/tests/fail/tree_borrows/write-during-2phase.stderr b/tests/fail/tree_borrows/write-during-2phase.stderr index 7f55e06a6b..11d148bc87 100644 --- a/tests/fail/tree_borrows/write-during-2phase.stderr +++ b/tests/fail/tree_borrows/write-during-2phase.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *alias = 42; | ^^^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions - = note: BACKTRACE (of the first span): - = note: inside `Foo::add` at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC -note: inside `main` +note: error occurred inside `Foo::add` + --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC + | +LL | fn add(&mut self, n: u64) -> u64 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC | LL | let res = f.add(unsafe { diff --git a/tests/fail/unaligned_pointers/drop_in_place.stderr b/tests/fail/unaligned_pointers/drop_in_place.stderr index ea144f2066..6fb62b7664 100644 --- a/tests/fail/unaligned_pointers/drop_in_place.stderr +++ b/tests/fail/unaligned_pointers/drop_in_place.stderr @@ -8,9 +8,8 @@ LL | | T: [const] Destruct, | = 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: - = note: inside `std::ptr::drop_in_place:: - shim(Some(PartialDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` + = note: this is inside `std::ptr::drop_in_place:: - shim(Some(PartialDrop))` +note: which got called inside `main` --> tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC | LL | core::ptr::drop_in_place(p); diff --git a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr index d2a5f83a43..6191549091 100644 --- a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr +++ b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr @@ -6,9 +6,8 @@ LL | unsafe { (*x).x } | = 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: - = note: inside `foo` at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC -note: inside `main` + = note: this is inside `foo` +note: which got called inside `main` --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC | LL | foo(odd_ptr.cast()); diff --git a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr index 39540fc832..58db5dda6a 100644 --- a/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr +++ b/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr @@ -6,9 +6,8 @@ LL | unsafe { (*x).packed.x } | = 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: - = note: inside `foo` at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC -note: inside `main` + = note: this is inside `foo` +note: which got called inside `main` --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC | LL | foo(odd_ptr.cast()); diff --git a/tests/fail/unaligned_pointers/reference_to_packed.stderr b/tests/fail/unaligned_pointers/reference_to_packed.stderr index a91be376bd..56a3bf129a 100644 --- a/tests/fail/unaligned_pointers/reference_to_packed.stderr +++ b/tests/fail/unaligned_pointers/reference_to_packed.stderr @@ -6,9 +6,8 @@ LL | mem::transmute(x) | = 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: - = note: inside `raw_to_ref::<'_, i32>` at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC -note: inside `main` + = note: this is inside `raw_to_ref::<'_, i32>` +note: which got called inside `main` --> tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC | LL | let p: &i32 = unsafe { raw_to_ref(ptr::addr_of!(foo.x)) }; diff --git a/tests/fail/uninit/uninit_alloc_diagnostic.stderr b/tests/fail/uninit/uninit_alloc_diagnostic.stderr index 25a9bddb42..6a2f038017 100644 --- a/tests/fail/uninit/uninit_alloc_diagnostic.stderr +++ b/tests/fail/uninit/uninit_alloc_diagnostic.stderr @@ -6,10 +6,9 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } | = 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: - = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC - = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC -note: inside `main` + = note: this is inside `::compare` + = note: which got called inside `core::slice::cmp::::cmp` (at RUSTLIB/core/src/slice/cmp.rs:LL:CC) +note: which got called inside `main` --> tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC | LL | drop(slice1.cmp(slice2)); diff --git a/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr b/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr index 305d8d4fbe..f40e796cca 100644 --- a/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr +++ b/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr @@ -6,10 +6,9 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } | = 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: - = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC - = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC -note: inside `main` + = note: this is inside `::compare` + = note: which got called inside `core::slice::cmp::::cmp` (at RUSTLIB/core/src/slice/cmp.rs:LL:CC) +note: which got called inside `main` --> tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC | LL | drop(slice1.cmp(slice2)); diff --git a/tests/fail/unwind-action-terminate.stderr b/tests/fail/unwind-action-terminate.stderr index cf41c88ce3..c86d94a820 100644 --- a/tests/fail/unwind-action-terminate.stderr +++ b/tests/fail/unwind-action-terminate.stderr @@ -14,21 +14,20 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `panic_abort` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `panic_abort` --> tests/fail/unwind-action-terminate.rs:LL:CC | LL | / extern "C" fn panic_abort() { LL | | panic!() LL | | } | |_^ -note: inside `main` +note: which got called inside `main` --> tests/fail/unwind-action-terminate.rs:LL:CC | LL | panic_abort(); diff --git a/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr b/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr index c370e19ef3..5c7572c76a 100644 --- a/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr +++ b/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr @@ -6,9 +6,8 @@ LL | Call(_res = f(*ptr), ReturnTo(retblock), UnwindContinue()) | = 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: - = note: inside `call` at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC -note: inside `main` + = note: this is inside `call` +note: which got called inside `main` --> tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC | LL | call(f); diff --git a/tests/fail/validity/invalid_char_cast.stderr b/tests/fail/validity/invalid_char_cast.stderr index c435e51d6b..6612bcd223 100644 --- a/tests/fail/validity/invalid_char_cast.stderr +++ b/tests/fail/validity/invalid_char_cast.stderr @@ -6,9 +6,8 @@ LL | RET = *ptr as u32; | = 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: - = note: inside `cast` at tests/fail/validity/invalid_char_cast.rs:LL:CC -note: inside `main` + = note: this is inside `cast` +note: which got called inside `main` --> tests/fail/validity/invalid_char_cast.rs:LL:CC | LL | cast(&v as *const u32 as *const char); diff --git a/tests/fail/validity/invalid_char_match.stderr b/tests/fail/validity/invalid_char_match.stderr index 141305a001..cda7301721 100644 --- a/tests/fail/validity/invalid_char_match.stderr +++ b/tests/fail/validity/invalid_char_match.stderr @@ -9,9 +9,8 @@ LL | | } | = 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: - = note: inside `switch_int` at tests/fail/validity/invalid_char_match.rs:LL:CC -note: inside `main` + = note: this is inside `switch_int` +note: which got called inside `main` --> tests/fail/validity/invalid_char_match.rs:LL:CC | LL | switch_int(&v as *const u32 as *const char); diff --git a/tests/fail/validity/invalid_enum_cast.stderr b/tests/fail/validity/invalid_enum_cast.stderr index b2d8764190..6a4d0e0375 100644 --- a/tests/fail/validity/invalid_enum_cast.stderr +++ b/tests/fail/validity/invalid_enum_cast.stderr @@ -6,9 +6,8 @@ LL | let _val = *ptr as u32; | = 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: - = note: inside `cast` at tests/fail/validity/invalid_enum_cast.rs:LL:CC -note: inside `main` + = note: this is inside `cast` +note: which got called inside `main` --> tests/fail/validity/invalid_enum_cast.rs:LL:CC | LL | cast(&v as *const u32 as *const E); diff --git a/tests/fail/weak_memory/weak_uninit.stderr b/tests/fail/weak_memory/weak_uninit.stderr index 99e06e7feb..9f3792e0e4 100644 --- a/tests/fail/weak_memory/weak_uninit.stderr +++ b/tests/fail/weak_memory/weak_uninit.stderr @@ -6,6 +6,12 @@ LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); | = 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: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/weak_memory/weak_uninit.rs:LL:CC + | +LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr b/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr index 7d03bd9a8e..85e2810f1f 100644 --- a/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr +++ b/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr @@ -17,19 +17,32 @@ help: ALLOC was deallocated here: | LL | dealloc(ptr as *mut u8, Layout::new::()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `free` at tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `free` + --> tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC + | +LL | unsafe fn free(ptr: *mut u64) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC | LL | free(b); | ^^^^^^^ - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC}>` + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC}>` --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr b/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr index bde793014b..4bca53961f 100644 --- a/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr +++ b/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr @@ -7,14 +7,23 @@ LL | dealloc(b as *mut u8, Layout::new::()); | = 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: inside closure at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr b/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr index 7bfafe0ca0..0a03363285 100644 --- a/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr +++ b/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr @@ -7,14 +7,23 @@ LL | *b = 42; | = 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: inside closure at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr b/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr index 0facf6a5d1..29a2e371bb 100644 --- a/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr +++ b/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr @@ -17,14 +17,27 @@ help: ALLOC was deallocated here: | LL | }), | ^ - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC}>` +note: error occurred on thread `unnamed-ID`, inside closure + --> tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC + | +LL | spawn_pthread_closure(|| { + | ^^ + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr b/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr index 8e4ed1aba0..3f5d0bdf34 100644 --- a/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr +++ b/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr @@ -7,14 +7,23 @@ LL | }), | = 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: inside closure at tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr b/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr index 1ffb55f22e..48b8a16c8b 100644 --- a/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr +++ b/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr @@ -7,14 +7,23 @@ LL | X = 2; | = 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: inside closure at tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr b/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr index b0037c211c..2eb3791aaf 100644 --- a/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr +++ b/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr @@ -7,14 +7,23 @@ LL | X = 2; | = 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: inside closure at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr b/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr index b0037c211c..2eb3791aaf 100644 --- a/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr +++ b/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr @@ -7,14 +7,23 @@ LL | X = 2; | = 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: inside closure at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr b/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr index b0037c211c..2eb3791aaf 100644 --- a/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr +++ b/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr @@ -7,14 +7,23 @@ LL | X = 2; | = 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: inside closure at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/tests/genmc/fail/loom/buggy_inc.stderr b/tests/genmc/fail/loom/buggy_inc.stderr index ad98ba6aeb..abda3e3118 100644 --- a/tests/genmc/fail/loom/buggy_inc.stderr +++ b/tests/genmc/fail/loom/buggy_inc.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/loom/store_buffering.genmc.stderr b/tests/genmc/fail/loom/store_buffering.genmc.stderr index 658914ba08..176ab6a573 100644 --- a/tests/genmc/fail/loom/store_buffering.genmc.stderr +++ b/tests/genmc/fail/loom/store_buffering.genmc.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/loom/store_buffering.non_genmc.stderr b/tests/genmc/fail/loom/store_buffering.non_genmc.stderr index d2036d464b..487ab21f28 100644 --- a/tests/genmc/fail/loom/store_buffering.non_genmc.stderr +++ b/tests/genmc/fail/loom/store_buffering.non_genmc.stderr @@ -3,6 +3,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr b/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr index db465969cd..e32548c4b5 100644 --- a/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr +++ b/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr @@ -7,16 +7,24 @@ LL | self.lock.inner.unlock(); | = 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: inside ` as std::ops::Drop>::drop` at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::ptr::drop_in_place::>> - shim(Some(EvilSend>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure + = note: this is on thread `unnamed-ID`, inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::ptr::drop_in_place::>> - shim(Some(EvilSend>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC | LL | drop(guard); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC + | +LL | let handle = std::thread::spawn(move || { + | __________________^ +LL | | let guard = guard; // avoid field capturing +LL | | drop(guard); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/shims/mutex_double_unlock.stderr b/tests/genmc/fail/shims/mutex_double_unlock.stderr index 3ba863668f..9fec95ae67 100644 --- a/tests/genmc/fail/shims/mutex_double_unlock.stderr +++ b/tests/genmc/fail/shims/mutex_double_unlock.stderr @@ -7,11 +7,10 @@ LL | self.lock.inner.unlock(); | = 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: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside `miri_start` + = note: this is inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside `miri_start` --> tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC | LL | drop(guard); diff --git a/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr b/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr index d6c66bf8f5..f7942d8ff7 100644 --- a/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr +++ b/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/simple/2w2w_weak.release4.stderr b/tests/genmc/fail/simple/2w2w_weak.release4.stderr index d6c66bf8f5..f7942d8ff7 100644 --- a/tests/genmc/fail/simple/2w2w_weak.release4.stderr +++ b/tests/genmc/fail/simple/2w2w_weak.release4.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr b/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr index d6c66bf8f5..f7942d8ff7 100644 --- a/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr +++ b/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/tests/genmc/fail/simple/alloc_large.multiple.stderr b/tests/genmc/fail/simple/alloc_large.multiple.stderr index 1d56614c7f..2fc6e3d472 100644 --- a/tests/genmc/fail/simple/alloc_large.multiple.stderr +++ b/tests/genmc/fail/simple/alloc_large.multiple.stderr @@ -6,13 +6,12 @@ LL | AllocInit::Uninitialized => alloc.allocate(layout), | ^^^^^^^^^^^^^^^^^^^^^^ resource exhaustion occurred here | = help: in GenMC mode, the address space is limited to 4GB per thread, and addresses cannot be reused - = note: BACKTRACE: - = note: inside `alloc::raw_vec::RawVecInner::try_allocate_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVecInner::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVec::::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity_in` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC -note: inside `miri_start` + = note: this is inside `alloc::raw_vec::RawVecInner::try_allocate_in` + = note: which got called inside `alloc::raw_vec::RawVecInner::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `alloc::raw_vec::RawVec::::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity_in` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) +note: which got called inside `miri_start` --> tests/genmc/fail/simple/alloc_large.rs:LL:CC | LL | let _v = Vec::::with_capacity(1024 * 1024 * 1024); diff --git a/tests/genmc/fail/simple/alloc_large.single.stderr b/tests/genmc/fail/simple/alloc_large.single.stderr index 8595612811..dbd39e4727 100644 --- a/tests/genmc/fail/simple/alloc_large.single.stderr +++ b/tests/genmc/fail/simple/alloc_large.single.stderr @@ -6,13 +6,12 @@ LL | AllocInit::Uninitialized => alloc.allocate(layout), | ^^^^^^^^^^^^^^^^^^^^^^ resource exhaustion occurred here | = help: in GenMC mode, the address space is limited to 4GB per thread, and addresses cannot be reused - = note: BACKTRACE: - = note: inside `alloc::raw_vec::RawVecInner::try_allocate_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVecInner::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVec::::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity_in` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC -note: inside `miri_start` + = note: this is inside `alloc::raw_vec::RawVecInner::try_allocate_in` + = note: which got called inside `alloc::raw_vec::RawVecInner::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `alloc::raw_vec::RawVec::::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity_in` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) +note: which got called inside `miri_start` --> tests/genmc/fail/simple/alloc_large.rs:LL:CC | LL | let _v = Vec::::with_capacity(8 * 1024 * 1024 * 1024); diff --git a/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr b/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr index 31438f9352..6d597aaa63 100644 --- a/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr +++ b/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr @@ -5,18 +5,27 @@ warning: GenMC currently does not model the failure ordering for `compare_exchan LL | match KEY.compare_exchange(KEY_SENTVAL, key, Release, Acquire) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ GenMC might miss possible behaviors of this code | - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside `get_or_init` at tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC -note: inside closure + = note: this is on thread `unnamed-ID`, inside `get_or_init` +note: which got called inside closure --> tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC | LL | let key = get_or_init(0); | ^^^^^^^^^^^^^^ - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC}>` + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC}>` --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ Verification complete with 2 executions. No errors found. diff --git a/tests/native-lib/fail/tracing/partial_init.stderr b/tests/native-lib/fail/tracing/partial_init.stderr index 1c0ad2f0dc..4a7d240906 100644 --- a/tests/native-lib/fail/tracing/partial_init.stderr +++ b/tests/native-lib/fail/tracing/partial_init.stderr @@ -9,9 +9,8 @@ LL | init_n(2, slice_ptr); = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `partial_init` at tests/native-lib/fail/tracing/partial_init.rs:LL:CC -note: inside `main` + = note: this is inside `partial_init` +note: which got called inside `main` --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC | LL | partial_init(); @@ -25,9 +24,8 @@ LL | let _val = *slice_ptr.offset(2); | = 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: - = note: inside `partial_init` at tests/native-lib/fail/tracing/partial_init.rs:LL:CC -note: inside `main` + = note: this is inside `partial_init` +note: which got called inside `main` --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC | LL | partial_init(); diff --git a/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr b/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr index 2d34dac1b3..825c9666b7 100644 --- a/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr +++ b/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr @@ -9,9 +9,8 @@ LL | unsafe { do_one_deref(exposed) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `unexposed_reachable_alloc` at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC -note: inside `main` + = note: this is inside `unexposed_reachable_alloc` +note: which got called inside `main` --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC | LL | unexposed_reachable_alloc(); @@ -25,9 +24,8 @@ LL | let _not_ok = *invalid; | = 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: - = note: inside `unexposed_reachable_alloc` at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC -note: inside `main` + = note: this is inside `unexposed_reachable_alloc` +note: which got called inside `main` --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC | LL | unexposed_reachable_alloc(); diff --git a/tests/native-lib/pass/ptr_read_access.notrace.stderr b/tests/native-lib/pass/ptr_read_access.notrace.stderr index 200eba8050..cbccd8fb62 100644 --- a/tests/native-lib/pass/ptr_read_access.notrace.stderr +++ b/tests/native-lib/pass/ptr_read_access.notrace.stderr @@ -8,9 +8,8 @@ LL | unsafe { print_pointer(&x) }; = help: in particular, Miri assumes that the native call initializes all memory it has access to = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free - = note: BACKTRACE: - = note: inside `test_access_pointer` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_access_pointer` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | test_access_pointer(); @@ -23,9 +22,8 @@ LL | pass_fn_ptr(Some(nop)); // this one is not | ^^^^^^^^^^^^^^^^^^^^^^ sharing a function pointer with a native function | = help: calling Rust functions from C is not supported and will, in the best case, crash the program - = note: BACKTRACE: - = note: inside `pass_fn_ptr` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `pass_fn_ptr` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | pass_fn_ptr(); diff --git a/tests/native-lib/pass/ptr_read_access.trace.stderr b/tests/native-lib/pass/ptr_read_access.trace.stderr index 5c0e954deb..2697fb6d43 100644 --- a/tests/native-lib/pass/ptr_read_access.trace.stderr +++ b/tests/native-lib/pass/ptr_read_access.trace.stderr @@ -9,9 +9,8 @@ LL | unsafe { print_pointer(&x) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `test_access_pointer` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_access_pointer` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | test_access_pointer(); @@ -24,9 +23,8 @@ LL | pass_fn_ptr(Some(nop)); // this one is not | ^^^^^^^^^^^^^^^^^^^^^^ sharing a function pointer with a native function | = help: calling Rust functions from C is not supported and will, in the best case, crash the program - = note: BACKTRACE: - = note: inside `pass_fn_ptr` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `pass_fn_ptr` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | pass_fn_ptr(); diff --git a/tests/native-lib/pass/ptr_write_access.notrace.stderr b/tests/native-lib/pass/ptr_write_access.notrace.stderr index c893b0d9f6..c7edaa3731 100644 --- a/tests/native-lib/pass/ptr_write_access.notrace.stderr +++ b/tests/native-lib/pass/ptr_write_access.notrace.stderr @@ -8,9 +8,8 @@ LL | unsafe { increment_int(&mut x) }; = help: in particular, Miri assumes that the native call initializes all memory it has access to = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free - = note: BACKTRACE: - = note: inside `test_increment_int` at tests/native-lib/pass/ptr_write_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_increment_int` +note: which got called inside `main` --> tests/native-lib/pass/ptr_write_access.rs:LL:CC | LL | test_increment_int(); diff --git a/tests/native-lib/pass/ptr_write_access.trace.stderr b/tests/native-lib/pass/ptr_write_access.trace.stderr index dbf021b15b..dacde45e17 100644 --- a/tests/native-lib/pass/ptr_write_access.trace.stderr +++ b/tests/native-lib/pass/ptr_write_access.trace.stderr @@ -9,9 +9,8 @@ LL | unsafe { increment_int(&mut x) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `test_increment_int` at tests/native-lib/pass/ptr_write_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_increment_int` +note: which got called inside `main` --> tests/native-lib/pass/ptr_write_access.rs:LL:CC | LL | test_increment_int(); diff --git a/tests/pass/alloc-access-tracking.stderr b/tests/pass/alloc-access-tracking.stderr index 745fd89f9f..b5b1bc2a7b 100644 --- a/tests/pass/alloc-access-tracking.stderr +++ b/tests/pass/alloc-access-tracking.stderr @@ -24,10 +24,9 @@ note: freed allocation ALLOC LL | self.1.deallocate(From::from(ptr.cast()), layout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tracking was triggered here | - = note: BACKTRACE: - = note: inside `> as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::>> - shim(Some(std::boxed::Box>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` + = note: this is inside `> as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::>> - shim(Some(std::boxed::Box>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) +note: which got called inside `main` --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | }