diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index 2d27f02749991..2dd8fc77459a0 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/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/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 10467fa79d9e7..1f87ac60c17a8 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/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,42 +555,30 @@ 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. - let mut extra_span = false; for (span_data, note) in notes { if let Some(span_data) = span_data { err.span_note(span_data.span(), note); - extra_span = true; } else { err.note(note); } @@ -601,43 +586,44 @@ fn report_msg<'tcx>( for (span_data, help) in helps { if let Some(span_data) = span_data { err.span_help(span_data.span(), help); - extra_span = true; } else { err.help(help); } } + // Only print thread name if there are multiple threads. + if let Some(thread) = thread + && machine.threads.get_total_thread_count() > 1 + { + err.note(format!( + "this is on thread `{}`", + machine.threads.get_thread_display_name(thread) + )); + } // 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(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(); - }; - } - write!(backtrace_title, ":").unwrap(); - err.note(backtrace_title); - for (idx, frame_info) in stacktrace.iter().enumerate() { - 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)); - } else { - let sm = sess.source_map(); + if stacktrace.len() > 0 { + // Skip it if we'd only shpw the span we have already shown + if stacktrace.len() > 1 { + let sm = tcx.sess.source_map(); + let mut out = format!("stack backtrace:"); + for (idx, frame_info) in stacktrace.iter().enumerate() { let span = sm.span_to_diagnostic_string(frame_info.span); - err.note(format!("{frame_info} at {span}")); + write!(out, "\n{idx}: {}", frame_info.instance).unwrap(); + write!(out, "\n at {span}").unwrap(); } + err.note(out); } - } 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() - )); + // For TLS dtors and non-main threads, show the "origin" + if !origin_span.is_dummy() { + let what = if stacktrace.len() > 1 { + "the last function in that backtrace" + } else { + "the current function" + }; + err.span_note(origin_span, format!("{what} 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/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs index 1c31236a2f805..f1389dd0821fb 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs @@ -1,4 +1,5 @@ //@only-target: darwin +//@compile-flags: -Zmiri-fixed-schedule #![feature(sync_unsafe_cell)] use std::cell::SyncUnsafeCell; diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr index 003ddb9b287d2..b4d2d2be6530c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr index f3f64a60a89bb..4e494e1d2a2c6 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC - | -LL | check() - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr index 4056f7d9d41b5..8b8ead3976f96 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC - | -LL | check() - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr index fef91e85470d9..979a1a8337b52 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr @@ -6,6 +6,7 @@ LL | libc::pthread_create(&mut native, ptr::null(), thread_start, pt | = 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` = note: this error occurred while pushing a call frame onto an empty stack = note: the span indicates which code caused the function to be called, but may not be the literal call site diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr index 4d70576d784c1..e8ad65a74ac8e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr @@ -6,6 +6,7 @@ LL | libc::pthread_create(&mut native, ptr::null(), thread_start, pt | = 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` = note: this error occurred while pushing a call frame onto an empty stack = note: the span indicates which code caused the function to be called, but may not be the literal call site diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr index 618584a117e48..60c4bd7f05897 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr index a9f16a96adc28..87eed26bcaa3e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index 46c9c5d3d714d..0d07c2bfa351b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr index 8a16f82a93072..8754aaecef944 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr index dec0139bd89a1..ffc7f2fe4cacb 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr index e3b0036c9aa9b..468c0e63cc34c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -2,26 +2,33 @@ 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` - --> 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 | | }) -LL | | .join() - | |_______________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr index 7b6e05828cea3..96be3f5764a3b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr @@ -6,15 +6,25 @@ 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` + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0}::{closure#2} + at tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC | -LL | drop(unsafe { Box::from_raw(m.get().cast::()) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr index a7cba0f00fe97..389b014ed6471 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC - | -LL | check(); - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr index 71f71efa0d96b..ba281a548c241 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC - | -LL | check(); - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr index 782322d5c32b3..d7c69e0884610 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr index 42dbd5f02cb3b..a8d9679eb9594 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr index 4705f9a1b5f02..9bc413fe8d53f 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index c7d858a444cc0..0a1de63325626 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr index ea8cbcada970d..57bd956dd3aa7 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr index f1f5c50baf479..d077c6a552ae5 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr index 255632870efc8..e00c297a9b298 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr @@ -2,26 +2,33 @@ 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` - --> 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 | | }) -LL | | .join() - | |_______________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr index 0208a5bae4f52..e6b6926235909 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index 6891b989d05f8..21fa8dcbd18de 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr @@ -2,26 +2,33 @@ 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` - --> 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 | | }) -LL | | .join() - | |_______________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr index 314e60b023607..25435eadd735b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index fdf4297c56ae9..ceba695ce5fb7 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr index 52affb767db51..73e79852d63a1 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -6,15 +6,16 @@ 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` - --> tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC - | -LL | thread.join().unwrap(); - | ^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr index d9cc93d0fc495..3d324ad0bdefa 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr @@ -2,28 +2,35 @@ 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` - --> 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 | | .join() - | |___________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/windows_join_main.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr index f5515983da2b4..8f28324363b33 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr @@ -2,13 +2,27 @@ 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` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/windows_join_self.rs:LL:CC + +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 got stuck here + | + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | / thread::spawn(|| { @@ -17,14 +31,7 @@ LL | | let native = GetCurrentThread(); LL | | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); LL | | } LL | | }) -LL | | .join() - | |___________^ - -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 + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr index 2b10a322b0be5..635091cc0173d 100644 --- a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr index 53ae7ea82bd95..f5cfd35847af4 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr @@ -2,23 +2,36 @@ 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` - --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr index 62810f17be887..92c3fc47c4fd6 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr @@ -2,23 +2,38 @@ 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` - --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr b/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr index 307762fb12c63..f2f6f373a2a75 100644 --- a/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr b/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr index 981f055e12946..edf428ae8ddaa 100644 --- a/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC - | -LL | test_mkstemp_immutable_arg(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_mkstemp_immutable_arg + at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC + 1: main + at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr b/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr index 298e67f1468b6..a85fae9c7dd27 100644 --- a/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC - | -LL | test_file_open_missing_needed_mode(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_file_open_missing_needed_mode + at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC + 1: main + at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr index a322de74b510a..e606a03e46fa1 100644 --- a/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr index dba12d1903170..af6578357a591 100644 --- a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr +++ b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr @@ -2,23 +2,35 @@ 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` - --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs index 4b731866aca1d..d923667d87419 100644 --- a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr index 275a38e593c8f..cc50564a43f5a 100644 --- a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr index a7c660e1adcc3..b40c35d6d2667 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr @@ -2,23 +2,38 @@ 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` - --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC - | -LL | thread1.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr index 7cee4b83ba906..fa7e45bccdc5a 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr index faab75f7840b6..d649076374f57 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr @@ -2,23 +2,38 @@ 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` - --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr index 9f95d98beb6f0..66f3359a1292c 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr @@ -2,23 +2,38 @@ 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` - --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC 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` +note: the current function 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/src/tools/miri/tests/fail-dep/libc/socketpair_read_blocking.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_read_blocking.stderr deleted file mode 100644 index caf23da1150f4..0000000000000 --- a/src/tools/miri/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/src/tools/miri/tests/fail-dep/libc/socketpair_write_blocking.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_write_blocking.stderr deleted file mode 100644 index 2dc420d5f1ef4..0000000000000 --- a/src/tools/miri/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/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr index b85a23e3c7db1..ed9b7ad18b0fa 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr @@ -7,18 +7,21 @@ 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` - --> tests/fail/alloc/alloc_error_handler.rs:LL:CC - | -LL | handle_alloc_error(Layout::for_value(&0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::alloc::rust_oom::{closure#0} + at RUSTLIB/std/src/alloc.rs:LL:CC + 1: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 2: std::alloc::rust_oom + at RUSTLIB/std/src/alloc.rs:LL:CC + 3: std::alloc::_::__rust_alloc_error_handler + at RUSTLIB/std/src/alloc.rs:LL:CC + 4: std::alloc::handle_alloc_error::rt_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 5: std::alloc::handle_alloc_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 6: main + at tests/fail/alloc/alloc_error_handler.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr index f8a96758aa2d3..677fa1b1bb9c0 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr @@ -5,22 +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` - --> 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` - --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC - | -LL | handle_alloc_error(Layout::for_value(&0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: alloc_error_handler + at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC + 1: _::__rust_alloc_error_handler + at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC + 2: alloc::alloc::handle_alloc_error::rt_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 3: alloc::alloc::handle_alloc_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 4: miri_start + at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr index 488b1d879e874..386e7cdc2bd81 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr @@ -7,16 +7,17 @@ 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` - --> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC - | -LL | handle_alloc_error(Layout::for_value(&0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: panic_handler + at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC + 1: alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 2: alloc::alloc::handle_alloc_error::rt_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 3: alloc::alloc::handle_alloc_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 4: miri_start + at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr index 5a5f7496237c3..4214e3e7675ba 100644 --- a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr +++ b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr @@ -6,14 +6,13 @@ 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` - --> tests/fail/alloc/global_system_mixup.rs:LL:CC - | -LL | unsafe { System.deallocate(ptr, l) }; - | ^ + = note: stack backtrace: + 0: std::sys::alloc::PLATFORM::dealloc + at RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC + 1: ::deallocate + at RUSTLIB/std/src/alloc.rs:LL:CC + 2: main + at tests/fail/alloc/global_system_mixup.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/stack_free.stderr b/src/tools/miri/tests/fail/alloc/stack_free.stderr index 6e98a7abc7600..deb42c0986794 100644 --- a/src/tools/miri/tests/fail/alloc/stack_free.stderr +++ b/src/tools/miri/tests/fail/alloc/stack_free.stderr @@ -6,15 +6,15 @@ 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` - --> tests/fail/alloc/stack_free.rs:LL:CC - | -LL | drop(bad_box); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main + at tests/fail/alloc/stack_free.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr index bc3db8c6801b0..7cedb24a25644 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr @@ -20,19 +20,15 @@ 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 - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | .await - | ^^^^^ -note: inside `main` - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0}::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 1: as std::future::Future>::poll + at RUSTLIB/core/src/future/poll_fn.rs:LL:CC + 2: main::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 3: main + at tests/fail/async-shared-mutable.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr b/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr index dc8b4f6665a03..fb68161837683 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr @@ -28,19 +28,15 @@ 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 - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | .await - | ^^^^^ -note: inside `main` - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0}::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 1: as std::future::Future>::poll + at RUSTLIB/core/src/future/poll_fn.rs:LL:CC + 2: main::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 3: main + at tests/fail/async-shared-mutable.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr index 196eaeb3fb6c2..cdd668f1f6330 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC - | -LL | safe_raw(xraw, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr index b9e6e25478062..d26a0fc0586ed 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC - | -LL | safe_raw(xraw, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr index e70e5b10793c1..c050dbb792b51 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC - | -LL | safe_raw(xshr, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr index aed59b21f1379..77597e4aa8313 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC - | -LL | safe_raw(xshr, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr index 9980d14e10549..49087d4722550 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC - | -LL | safe_raw(xraw, xshr); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr index 357d7d220192a..32f980da6f7ed 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC - | -LL | safe_raw(xraw, xshr); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr index eb2514df588a6..f56270f48bea2 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | safe_raw(xshr, xraw as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr index c06ae0e92138e..11eb1ae7ddeec 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr @@ -19,20 +19,17 @@ 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` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | y.set(1); - | ^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | safe_raw(xshr, xraw as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::mem::replace + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 1: std::cell::Cell::replace + at RUSTLIB/core/src/cell.rs:LL:CC + 2: std::cell::Cell::set + at RUSTLIB/core/src/cell.rs:LL:CC + 3: safe + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC + 4: main + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr index 009ec2dd4aaac..69f7c908119ff 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr @@ -16,18 +16,13 @@ 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` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | demo_box_advanced_unique(Box::new(0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 1: demo_box_advanced_unique + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr index d4cfab024bae1..b4def1008f7d3 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr @@ -18,18 +18,13 @@ 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` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | demo_box_advanced_unique(Box::new(0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 1: demo_box_advanced_unique + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr index cc6633eb24f94..7bf29bfdcb587 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC - | -LL | test(Box::from_raw(ptr), ptr); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + 1: main + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr index 6a1f7761a4108..0744b0e9499bc 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr @@ -25,13 +25,11 @@ 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` - --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC - | -LL | test(Box::from_raw(ptr), ptr); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + 1: main + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr index c4cb2c7ae4d65..ef7d54b0b19d9 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr @@ -22,13 +22,11 @@ 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` - --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC - | -LL | let (a, b) = safe::split_at_mut(&mut array, 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe::split_at_mut + at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC + 1: main + at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr index 40b44d77e3df5..21d1504b03b15 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/illegal_write6.rs:LL:CC - | -LL | foo(x, p); - | ^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/illegal_write6.rs:LL:CC + 1: main + at tests/fail/both_borrows/illegal_write6.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr index 1547a6ca73a04..923dd33a0a17d 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr @@ -25,13 +25,11 @@ 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` - --> tests/fail/both_borrows/illegal_write6.rs:LL:CC - | -LL | foo(x, p); - | ^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/illegal_write6.rs:LL:CC + 1: main + at tests/fail/both_borrows/illegal_write6.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr index ef531be496afd..12de173519ace 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC - | -LL | inner(xraw, xref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr index 90a89e48e61bf..26882ae08024b 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC - | -LL | inner(xraw, xref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr index caf2b702fec60..b1215852a35f9 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC - | -LL | inner(ptr, &*ptr); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr index 8bac71dcd4682..ae2dc93fd109b 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC - | -LL | inner(ptr, &*ptr); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr index 9927d90c6469a..14a4065c1f0a5 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr @@ -11,14 +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` - --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC - | -LL | drop(Box::from_raw(ptr as *mut u32)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr index 9927d90c6469a..14a4065c1f0a5 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr @@ -11,14 +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` - --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC - | -LL | drop(Box::from_raw(ptr as *mut u32)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr index c704085f95832..beb712388f91f 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr @@ -6,14 +6,13 @@ 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` - --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC - | -LL | drop(Box::from_raw(ptr.as_ptr())); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr index c704085f95832..beb712388f91f 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr @@ -6,14 +6,13 @@ 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` - --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC - | -LL | drop(Box::from_raw(ptr.as_ptr())); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr index 3c8316ca5bc18..772e7c03bf6e2 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr @@ -16,18 +16,13 @@ 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` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | demo_mut_advanced_unique(&mut 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 1: demo_mut_advanced_unique + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr index f5c1dea69f02b..97400d479d325 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr @@ -18,18 +18,13 @@ 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` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | demo_mut_advanced_unique(&mut 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 1: demo_mut_advanced_unique + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr index 7cee5fb1369d1..d7688680e7da2 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr @@ -16,27 +16,17 @@ 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 - --> 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}>` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr, 0), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main::{closure#0} + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 3: dealloc_while_running + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 4: main + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr index aa07ef53b315b..68b9d1c86d1a8 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr @@ -25,28 +25,19 @@ 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 - --> 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}>` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr, 0), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 4: dealloc_while_running + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 5: main + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr index 7bd42fc20ce7a..b7b0f28126698 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr @@ -16,27 +16,17 @@ 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 - --> 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}>` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main::{closure#0} + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 3: dealloc_while_running + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 4: main + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr index c8a72c5917620..5069b1d01cd2b 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr @@ -25,28 +25,19 @@ 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 - --> 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}>` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 4: dealloc_while_running + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 5: main + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr index d97850d7a4449..f0d98ee6f20f7 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -14,13 +14,17 @@ 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: thread_2 + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + 1: main::{closure#1} + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC +note: the last function in that backtrace 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/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr index c1b37f8a9bfc4..bf8b2f8690fe5 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -14,13 +14,17 @@ 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: thread_2 + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + 1: main::{closure#1} + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC +note: the last function in that backtrace 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/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr index 7c4fe74870121..8ca0cd4bda430 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC - | -LL | foo(&mut (1, 2)); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr index a8e3553aae2c2..0147769bb9496 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC - | -LL | foo(&mut (1, 2)); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr index 8411437ea4c97..94d538072ae07 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC - | -LL | match foo(&mut (1, 2)) { - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr index 39da45ad6db4d..f66798c435864 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC - | -LL | match foo(&mut (1, 2)) { - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr index a7c422aa73f2c..ffe673e1bcf9b 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC - | -LL | foo(&mut (1, 2)).0; - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr index 66b03e57905e9..1eee9ed338ec0 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC - | -LL | foo(&mut (1, 2)).0; - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr index eed8c0273ab12..aae9f8efbe9fb 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr @@ -11,18 +11,13 @@ 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` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | unknown_code(&*x); - | ^^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | println!("{}", foo(&mut 0)); - | ^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 1: foo + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr index d9b75f65f752e..274d5becddfdf 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr @@ -12,18 +12,13 @@ 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` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | unknown_code(&*x); - | ^^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | println!("{}", foo(&mut 0)); - | ^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 1: foo + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/box-cell-alias.stderr b/src/tools/miri/tests/fail/box-cell-alias.stderr index 8e1e9370c7074..63cdc98d3054e 100644 --- a/src/tools/miri/tests/fail/box-cell-alias.stderr +++ b/src/tools/miri/tests/fail/box-cell-alias.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/box-cell-alias.rs:LL:CC - | -LL | let res = helper(val, ptr); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: helper + at tests/fail/box-cell-alias.rs:LL:CC + 1: main + at tests/fail/box-cell-alias.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr b/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr index 995a5e3eac146..aea878660115f 100644 --- a/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr +++ b/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr @@ -6,13 +6,11 @@ LL | match r { | = 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/closures/uninhabited-variant.rs:LL:CC -note: inside `main` - --> tests/fail/closures/uninhabited-variant.rs:LL:CC - | -LL | f(); - | ^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/closures/uninhabited-variant.rs:LL:CC + 1: main + at tests/fail/closures/uninhabited-variant.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs index 9c73f6c03edd4..6d8bd3d3f2a43 100644 --- a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs +++ b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs @@ -3,8 +3,9 @@ //@normalize-stderr-test: "LL \| .*" -> "LL | $$CODE" //@normalize-stderr-test: "\| +\^+" -> "| ^" //@normalize-stderr-test: "\n *= note:.*" -> "" +//@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" // 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/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr index 7784132a54ce8..b036141bb2678 100644 --- a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr +++ b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr @@ -2,13 +2,8 @@ error: the evaluated program deadlocked --> RUSTLIB/std/$FILE:LL:CC | LL | $CODE - | ^ thread `main` got stuck here + | ^ thread got stuck here | -note: inside `main` - --> tests/fail/concurrency/mutex-leak-move-deadlock.rs:LL:CC - | -LL | $CODE - | ^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr index 70ecfa9379a7d..0c57c6894a085 100644 --- a/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr +++ b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr @@ -16,19 +16,15 @@ 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` - --> 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` - --> tests/fail/coroutine-pinned-moved.rs:LL:CC - | -LL | coroutine_iterator_2.next(); // and use moved value - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: firstn::{closure#0} + at tests/fail/coroutine-pinned-moved.rs:LL:CC + 1: as std::iter::Iterator>::next + at tests/fail/coroutine-pinned-moved.rs:LL:CC + 2: std::boxed::iter::next + at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC + 3: main + at tests/fail/coroutine-pinned-moved.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr b/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr index df2b227c80978..feff143cba66c 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC - | -LL | via_ref(ptr); // this is not - | ^^^^^^^^^^^^ + = note: stack backtrace: + 0: via_ref + at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC + 1: main + at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr b/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr index 3a3133049b21d..67b60e6bca41c 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC - | -LL | evil(); - | ^^^^^^ + = note: stack backtrace: + 0: evil + at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC + 1: main + at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr index d4933db2ed575..ddb2edc68d489 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr index da7f5ed869db1..93fe9ff5539a9 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr index 203e6a10e4977..aa8a484612087 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr index 791dc71f99301..1d1dc68784d91 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr index 73d963875fb10..b65e4e3609e7a 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr index 066fff5e3d360..444d73d46b3cf 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr index 10b7d8398d9d9..ca67861b47ce0 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr index bb854bc4235c8..b67a2bac102dc 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr index 8cecfbee9d956..d90b8f528f3cd 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr index 7260776043eae..67b254c265dae 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr @@ -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/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr index c4200ea96153d..feb35ddcd34cf 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr index 5ab5c9655d78a..f1bd657cc5a84 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr index b52e48827b4b6..a07dd0a1a1da0 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr index 0a574068d4e7b..f24830d73fb1e 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr index 9fbae21eb8912..a4712554a0874 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr index 0c853ccb8cc1f..cc23bc0f611f4 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr index a8eee1241b65e..1cbca79e04a81 100644 --- a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/fence_after_load.stderr b/src/tools/miri/tests/fail/data_race/fence_after_load.stderr index bf2ac30a1e3f4..f2098e1d3e2d6 100644 --- a/src/tools/miri/tests/fail/data_race/fence_after_load.stderr +++ b/src/tools/miri/tests/fail/data_race/fence_after_load.stderr @@ -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/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr index 52bd7721ef22a..7f97fc775ca98 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr index 969b6faadbe1c..e9173feb61ddd 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr index 0bf7dd28c0f95..859ade5fb65db 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr index 087f326053b52..b74351a5f2960 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr index 66aee703e4f3a..be78189a695d8 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr index 967fd45c5b36c..736509cd3a9e0 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr index 7664c3f13e3d8..f4aa4cbd933f2 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr index f1884bf404f15..10356419dc1e4 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr @@ -19,6 +19,14 @@ LL | | ); = 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` +note: the current function got called indirectly due to this code + --> tests/fail/data_race/mixed_size_read_write_read.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let _val = data.load(Ordering::Relaxed); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr index 7e30cf6856de7..6c5ac0ca21189 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr index 74bb72b986af0..7e7461a7a4f6f 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/mixed_size_write_write.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.stderr deleted file mode 100644 index 1f22413bc5f93..0000000000000 --- a/src/tools/miri/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/src/tools/miri/tests/fail/data_race/read_write_race.stderr b/src/tools/miri/tests/fail/data_race/read_write_race.stderr index ce063d8c532f3..f0eae9841bee5 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr index 5ac78a2ecf6b0..703a025087276 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr index fffde0370a2aa..1fb793912b72a 100644 --- a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr +++ b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/release_seq_race.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr index 61f5501434b81..8f01b7cdad51a 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr index 2c28ee03e786b..a7fdf8e219f51 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/rmw_race.stderr b/src/tools/miri/tests/fail/data_race/rmw_race.stderr index 04621ff07b81b..8bbd9929517e6 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr b/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr index 130a31ebeef09..c543bcf111509 100644 --- a/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr +++ b/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr @@ -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/src/tools/miri/tests/fail/data_race/write_write_race.stderr b/src/tools/miri/tests/fail/data_race/write_write_race.stderr index 03bee0060a4e1..33352a5ded586 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr index cb2faf4ac2742..a439be8590159 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr @@ -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` +note: the current function 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/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr b/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr index f3ec20837d374..a9a8deb05aae1 100644 --- a/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr +++ b/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC - | -LL | set_discriminant(&mut v); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: set_discriminant + at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC + 1: main + at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr index 8a454bedb281b..952f2272f3bf6 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr @@ -21,13 +21,11 @@ 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` - --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC - | -LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: callee + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr index 74706d6b9f6bc..095dc7e1a1fb5 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr @@ -30,13 +30,11 @@ 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` - --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC - | -LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: callee + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr index 09a5b9a649619..22077345243fd 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: change_arg + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC Uninitialized memory occurred at ALLOC[0x0..0x4], in this allocation: ALLOC (stack variable, size: 4, align: 4) { diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr index 609599ef6ca8d..d625d1d1d034c 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr @@ -21,13 +21,11 @@ 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` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: change_arg + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr index c8c0e5c37efed..a01c040fe6f81 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr @@ -30,13 +30,11 @@ 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` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: change_arg + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index 95f79aae6c177..3c71934ac63ea 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -14,25 +14,7 @@ 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` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | / extern "C-unwind" fn nounwind() { -LL | | panic!(); -LL | | } - | |_^ -note: inside `main` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | unsafe { nounwind() } - | ^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index 95f79aae6c177..3c71934ac63ea 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -14,25 +14,7 @@ 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` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | / extern "C-unwind" fn nounwind() { -LL | | panic!(); -LL | | } - | |_^ -note: inside `main` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | unsafe { nounwind() } - | ^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr index d478568ceaeb5..016849a6a336a 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC Uninitialized memory occurred at ALLOC[0x0..0x4], in this allocation: ALLOC (stack variable, size: 4, align: 4) { diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr index 86adbab353b48..73c562c94e951 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr @@ -21,13 +21,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr index b43e19c3905c0..0dc137843c91c 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr @@ -30,13 +30,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr index faae6172d7510..6654ddc12c29b 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr @@ -21,13 +21,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr index deefb24b7850d..6472dfd4f995a 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr @@ -30,13 +30,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr index 1a18857bb1755..79f4d2c69f3c2 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr @@ -21,13 +21,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun2 + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr index 76ccf39744d9b..82b898df45b2e 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr @@ -30,13 +30,11 @@ 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` - --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun2 + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (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/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr b/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr index 755bc3e7c2c03..db7fb1a68790a 100644 --- a/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr +++ b/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC - | -LL | let copy = bar(input); - | ^^^^^^^^^^ + = note: stack backtrace: + 0: bar + at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC + 1: main + at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr index 1e7f500edb2dd..249eba76c83da 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC - | -LL | let _meta = deref_meta(p.as_ptr().cast()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref_meta + at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC + 1: main + at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC Uninitialized memory occurred at ALLOC[0xX..0xY], in this allocation: ALLOC DUMP diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr index d284a6f6d0193..371802a7bcf27 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC - | -LL | let _meta = deref_meta(p.as_ptr().cast()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref_meta + at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC + 1: main + at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC Uninitialized memory occurred at ALLOC[0xX..0xY], in this allocation: ALLOC DUMP diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr index 7a1f3d6ea84f6..207e7983aab46 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC - | -LL | let _meta = deref_meta(p.as_ptr()); - | ^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref_meta + at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC + 1: main + at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC Uninitialized memory occurred at ALLOC[0xX..0xY], in this allocation: ALLOC DUMP diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr index 7db7958299257..6cdcd114d5cf7 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC - | -LL | invalid_array(); - | ^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: invalid_array + at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC + 1: main + at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr index 7edf72205d9ee..223f7430b60a9 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC - | -LL | invalid_scalar(); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: invalid_scalar + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC + 1: main + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr index aece0b6cb98a4..59e3920850014 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC - | -LL | invalid_scalar(); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: invalid_scalar + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC + 1: main + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/issue-miri-1112.stderr b/src/tools/miri/tests/fail/issue-miri-1112.stderr index 98f04ff1af65b..0c5c6a94baf2d 100644 --- a/src/tools/miri/tests/fail/issue-miri-1112.stderr +++ b/src/tools/miri/tests/fail/issue-miri-1112.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/issue-miri-1112.rs:LL:CC - | -LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: FunnyPointer::from_data_ptr + at tests/fail/issue-miri-1112.rs:LL:CC + 1: main + at tests/fail/issue-miri-1112.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/memleak_rc.stderr b/src/tools/miri/tests/fail/memleak_rc.stderr index df12eeed6ac64..91097a99117f2 100644 --- a/src/tools/miri/tests/fail/memleak_rc.stderr +++ b/src/tools/miri/tests/fail/memleak_rc.stderr @@ -4,13 +4,11 @@ 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` - --> tests/fail/memleak_rc.rs:LL:CC - | -LL | let x = Dummy(Rc::new(RefCell::new(None))); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rc::Rc::new + at RUSTLIB/alloc/src/rc.rs:LL:CC + 1: main + at tests/fail/memleak_rc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/never_transmute_void.rs b/src/tools/miri/tests/fail/never_transmute_void.rs index ad67b4446165c..a2db2ca9db61b 100644 --- a/src/tools/miri/tests/fail/never_transmute_void.rs +++ b/src/tools/miri/tests/fail/never_transmute_void.rs @@ -1,6 +1,5 @@ // This should fail even without validation //@compile-flags: -Zmiri-disable-validation -//@require-annotations-for-level: ERROR #![feature(never_type)] #![allow(unused, invalid_value)] @@ -18,5 +17,4 @@ mod m { fn main() { let v = unsafe { std::mem::transmute::<(), m::Void>(()) }; m::f(v); - //~^ NOTE: inside `main` } diff --git a/src/tools/miri/tests/fail/never_transmute_void.stderr b/src/tools/miri/tests/fail/never_transmute_void.stderr index 10ef783f22014..ce65be6ef1b49 100644 --- a/src/tools/miri/tests/fail/never_transmute_void.stderr +++ b/src/tools/miri/tests/fail/never_transmute_void.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/never_transmute_void.rs:LL:CC - | -LL | m::f(v); - | ^^^^^^^ + = note: stack backtrace: + 0: m::f + at tests/fail/never_transmute_void.rs:LL:CC + 1: main + at tests/fail/never_transmute_void.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/overlapping_assignment.stderr b/src/tools/miri/tests/fail/overlapping_assignment.stderr index a479e8be64819..43e767e975559 100644 --- a/src/tools/miri/tests/fail/overlapping_assignment.stderr +++ b/src/tools/miri/tests/fail/overlapping_assignment.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/overlapping_assignment.rs:LL:CC - | -LL | self_copy(ptr, ptr); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: self_copy + at tests/fail/overlapping_assignment.rs:LL:CC + 1: main + at tests/fail/overlapping_assignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/abort_unwind.stderr b/src/tools/miri/tests/fail/panic/abort_unwind.stderr index 23dbc2fb8f392..d5699fc41dfe4 100644 --- a/src/tools/miri/tests/fail/panic/abort_unwind.stderr +++ b/src/tools/miri/tests/fail/panic/abort_unwind.stderr @@ -14,19 +14,7 @@ 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` - --> tests/fail/panic/abort_unwind.rs:LL:CC - | -LL | std::panic::abort_unwind(|| panic!("PANIC!!!")); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/bad_unwind.stderr b/src/tools/miri/tests/fail/panic/bad_unwind.stderr index b0a8492b6a617..d47f7b5b10c1f 100644 --- a/src/tools/miri/tests/fail/panic/bad_unwind.stderr +++ b/src/tools/miri/tests/fail/panic/bad_unwind.stderr @@ -11,16 +11,17 @@ 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` - --> tests/fail/panic/bad_unwind.rs:LL:CC - | -LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/panic/bad_unwind.rs:LL:CC + 1: std::panicking::catch_unwind::do_call + at RUSTLIB/std/src/panicking.rs:LL:CC + 2: std::panicking::catch_unwind + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panic::catch_unwind + at RUSTLIB/std/src/panic.rs:LL:CC + 4: main + at tests/fail/panic/bad_unwind.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/double_panic.stderr b/src/tools/miri/tests/fail/panic/double_panic.stderr index edbc0d8fc571b..34a62a09cc3ee 100644 --- a/src/tools/miri/tests/fail/panic/double_panic.stderr +++ b/src/tools/miri/tests/fail/panic/double_panic.stderr @@ -17,21 +17,7 @@ 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` - --> tests/fail/panic/double_panic.rs:LL:CC - | -LL | / fn main() { -LL | | let _foo = Foo; -LL | | panic!("first"); -LL | | } - | |_^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/no_std.stderr b/src/tools/miri/tests/fail/panic/no_std.stderr index dbd29e43069ef..87adb18a7ab90 100644 --- a/src/tools/miri/tests/fail/panic/no_std.stderr +++ b/src/tools/miri/tests/fail/panic/no_std.stderr @@ -6,13 +6,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/panic/no_std.rs:LL:CC -note: inside `miri_start` - --> tests/fail/panic/no_std.rs:LL:CC - | -LL | panic!("blarg I am dead") - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: panic_handler + at tests/fail/panic/no_std.rs:LL:CC + 1: miri_start + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort1.stderr b/src/tools/miri/tests/fail/panic/panic_abort1.stderr index c389a9bc0750b..4135ceadc5397 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort1.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort1.stderr @@ -9,19 +9,23 @@ 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` - --> tests/fail/panic/panic_abort1.rs:LL:CC - | -LL | std::panic!("panicking from libstd"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort2.stderr b/src/tools/miri/tests/fail/panic/panic_abort2.stderr index 5fe2245cbe009..5b485604037ce 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort2.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort2.stderr @@ -9,19 +9,23 @@ 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` - --> tests/fail/panic/panic_abort2.rs:LL:CC - | -LL | std::panic!("{}-panicking from libstd", 42); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort3.stderr b/src/tools/miri/tests/fail/panic/panic_abort3.stderr index cac24ca41c715..e4179f93f931c 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort3.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort3.stderr @@ -9,19 +9,23 @@ 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` - --> tests/fail/panic/panic_abort3.rs:LL:CC - | -LL | core::panic!("panicking from libcore"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort4.stderr b/src/tools/miri/tests/fail/panic/panic_abort4.stderr index 21195729ae82b..d2e50b87068f6 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort4.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort4.stderr @@ -9,19 +9,23 @@ 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` - --> tests/fail/panic/panic_abort4.rs:LL:CC - | -LL | core::panic!("{}-panicking from libcore", 42); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs b/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs index 93ad42ea1cced..c25684af50902 100644 --- a/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs +++ b/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs @@ -4,6 +4,7 @@ //@compile-flags: -Zmiri-backtrace=full //@normalize-stderr-test: "'main'|''" -> "$$NAME" //@normalize-stderr-test: ".*(note|-->|\|).*\n" -> "" +//@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" pub struct NoisyDrop {} diff --git a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs index a207d3923124a..32fd8318f7963 100644 --- a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs +++ b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs @@ -1,7 +1,8 @@ //@error-in-other-file: aborted execution // Backtraces vary wildly between platforms, we have to normalize away almost the entire thing //@normalize-stderr-test: "'main'|''" -> "$$NAME" -//@normalize-stderr-test: ".*(note|-->|:::|\|).*\n" -> "" +//@normalize-stderr-test: ".*(note|-->|\|).*\n" -> "" +//@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" pub struct NoisyDrop {} diff --git a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr index 39263a8d61cc9..ec243f114af07 100644 --- a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr +++ b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr @@ -3,6 +3,7 @@ thread $NAME ($TID) panicked at tests/fail/panic/tls_macro_drop_panic.rs:LL:CC: ow fatal runtime error: thread local panicked on drop, aborting error: abnormal termination: the program aborted execution + ::: RUSTLIB/std/src/sys/thread_local/PLATFORM.rs:LL:CC error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr b/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr index 013c39a22462d..fc9f394a568c7 100644 --- a/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr +++ b/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/provenance/provenance_transmute.rs:LL:CC - | -LL | deref(ptr1, ptr2.with_addr(ptr1.addr())); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref + at tests/fail/provenance/provenance_transmute.rs:LL:CC + 1: main + at tests/fail/provenance/provenance_transmute.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr b/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr index c5f6e62b86906..7275be1343ac9 100644 --- a/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr +++ b/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr @@ -12,16 +12,7 @@ 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` - --> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC - | -LL | std::ptr::swap_nonoverlapping(ptr, ptr, 1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/shims/ctor_ub.rs b/src/tools/miri/tests/fail/shims/ctor_ub.rs new file mode 100644 index 0000000000000..860f602e69d05 --- /dev/null +++ b/src/tools/miri/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/src/tools/miri/tests/fail/shims/ctor_ub.stderr b/src/tools/miri/tests/fail/shims/ctor_ub.stderr new file mode 100644 index 0000000000000..e89f3b3c90593 --- /dev/null +++ b/src/tools/miri/tests/fail/shims/ctor_ub.stderr @@ -0,0 +1,22 @@ +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: the current function 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/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr index f08909d442767..af55ccfe5e679 100644 --- a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr +++ b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr @@ -6,23 +6,31 @@ 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` - --> tests/fail/shims/fs/isolated_file.rs:LL:CC - | -LL | let _file = std::fs::File::open("file.txt").unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::sys::fs::PLATFORM::File::open_c::{closure#0} + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 1: std::sys::pal::PLATFORM::cvt_r + at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC + 2: std::sys::fs::PLATFORM::File::open_c + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 3: std::sys::fs::PLATFORM::File::open::{closure#0} + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 4: std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack + at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + 5: std::sys::pal::PLATFORM::small_c_string::run_with_cstr + at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + 6: std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr + at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + 7: std::sys::fs::PLATFORM::File::open + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 8: std::fs::OpenOptions::_open + at RUSTLIB/std/src/fs.rs:LL:CC + 9: std::fs::OpenOptions::open + at RUSTLIB/std/src/fs.rs:LL:CC + 10: std::fs::File::open + at RUSTLIB/std/src/fs.rs:LL:CC + 11: main + at tests/fail/shims/fs/isolated_file.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/shims/isolated_stdin.stderr b/src/tools/miri/tests/fail/shims/isolated_stdin.stderr index 5fda90b46ef6f..c478f1412bbf7 100644 --- a/src/tools/miri/tests/fail/shims/isolated_stdin.stderr +++ b/src/tools/miri/tests/fail/shims/isolated_stdin.stderr @@ -5,10 +5,6 @@ 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` - --> tests/fail/shims/isolated_stdin.rs:LL:CC - | - | ^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr b/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr index 8d18e5a7d6053..266f9247b98d7 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr @@ -6,29 +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 - --> 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` - --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC - | -LL | f(x) - | ^^^^ -note: inside `main` - --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC - | -LL | / inner(Box::leak(Box::new(0)), |x| { -LL | | let raw = x as *mut _; -LL | | drop(unsafe { Box::from_raw(raw) }); -LL | | }); - | |______^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC + 4: <{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 + 5: inner + at tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC + 6: main + at tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr index 464c44802ec30..027fe239319a3 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr @@ -16,15 +16,15 @@ 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` - --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC - | -LL | core::ptr::drop_in_place(x); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: ::drop + at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC + 1: std::ptr::drop_in_place - shim(Some(HasDrop)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::ptr::drop_in_place - shim(Some((HasDrop, u8))) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 3: main + at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC = note: this error originates in the macro `core::ptr::addr_of_mut` (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/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr index e586d3f03994f..cffa175569506 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr @@ -13,13 +13,11 @@ 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` - --> tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC - | -LL | core::ptr::drop_in_place(x.cast_mut()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::ptr::drop_in_place - shim(None) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC = note: this error originates in the macro `core::ptr::addr_of` (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/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr b/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr index b082abe7b25b4..336dff598b420 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC - | -LL | inner(xraw, xref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr index b07599a500ee0..4f6045c7c16a2 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC - | -LL | fun2(); // if they now use a raw ptr they break our reference - | ^^^^^^ + = note: stack backtrace: + 0: fun2 + at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr index 5b8f77600cd29..7f112a2e85b65 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr deleted file mode 100644 index 1d7ea18982d1d..0000000000000 --- a/src/tools/miri/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/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr index ee82bbbb1ed14..c162bee0a6722 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -14,13 +14,17 @@ 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: thread_2 + at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC + 1: main::{closure#1} + at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC +note: the last function in that backtrace 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/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr deleted file mode 100644 index e6c1745d321c1..0000000000000 --- a/src/tools/miri/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/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr index 4ac82192a9fbb..88dfd1ec9db92 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC - | -LL | foo(&mut (1, 2)); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr index 7e7670e49f17c..5ccb09c7fd844 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC - | -LL | match foo(&mut (1, 2)) { - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr index aeaa694d29233..eb68a637c2297 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC - | -LL | foo(&mut (1, 2)).0; - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr b/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr index 61a57a64116b3..c7e471f570c85 100644 --- a/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr +++ b/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr @@ -6,20 +6,33 @@ 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: stack backtrace: + 0: >::call_once - shim(fn()) + at RUSTLIB/core/src/ops/function.rs:LL:CC + 1: std::sys::backtrace::__rust_begin_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 2: std::rt::lang_start::{closure#0} + at RUSTLIB/std/src/rt.rs:LL:CC + 3: std::ops::function::impls::call_once + at RUSTLIB/core/src/ops/function.rs:LL:CC + 4: std::panicking::catch_unwind::do_call + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::panicking::catch_unwind + at RUSTLIB/std/src/panicking.rs:LL:CC + 6: std::panic::catch_unwind + at RUSTLIB/std/src/panic.rs:LL:CC + 7: std::rt::lang_start_internal::{closure#0} + at RUSTLIB/std/src/rt.rs:LL:CC + 8: std::panicking::catch_unwind::do_call + at RUSTLIB/std/src/panicking.rs:LL:CC + 9: std::panicking::catch_unwind + at RUSTLIB/std/src/panicking.rs:LL:CC + 10: std::panic::catch_unwind + at RUSTLIB/std/src/panic.rs:LL:CC + 11: std::rt::lang_start_internal + at RUSTLIB/std/src/rt.rs:LL:CC + 12: std::rt::lang_start + at RUSTLIB/std/src/rt.rs:LL:CC error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr index 965dd5b399f75..1577cceae5944 100644 --- a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr +++ b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr @@ -16,13 +16,11 @@ 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` - --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC - | -LL | f(std::ptr::null()); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: g + at tests/fail/tail_calls/dangling-local-var.rs:LL:CC + 1: main + at tests/fail/tail_calls/dangling-local-var.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/terminate-terminator.stderr b/src/tools/miri/tests/fail/terminate-terminator.stderr index 8ae649a392bda..6c38de9b03146 100644 --- a/src/tools/miri/tests/fail/terminate-terminator.stderr +++ b/src/tools/miri/tests/fail/terminate-terminator.stderr @@ -16,31 +16,7 @@ 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` - --> tests/fail/terminate-terminator.rs:LL:CC - | -LL | / fn has_cleanup() { -LL | | let _f = Foo; -LL | | panic!(); -LL | | } - | |_^ -note: inside `panic_abort` - --> tests/fail/terminate-terminator.rs:LL:CC - | -LL | has_cleanup(); - | ^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/terminate-terminator.rs:LL:CC - | -LL | panic_abort(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr b/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr index db113b6cf457c..efc4bead418ee 100644 --- a/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/fail/tls_macro_leak.stderr b/src/tools/miri/tests/fail/tls_macro_leak.stderr index 512932b3cb8a6..3f8240f44547f 100644 --- a/src/tools/miri/tests/fail/tls_macro_leak.stderr +++ b/src/tools/miri/tests/fail/tls_macro_leak.stderr @@ -4,17 +4,15 @@ 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 - --> tests/fail/tls_macro_leak.rs:LL:CC - | -LL | / TLS.with(|cell| { -LL | | cell.set(Some(Box::leak(Box::new(123)))); -LL | | }); - | |__________^ + = note: stack backtrace: + 0: main::{closure#0}::{closure#0} + at tests/fail/tls_macro_leak.rs:LL:CC + 1: std::thread::LocalKey::>>::try_with + at RUSTLIB/std/src/thread/local.rs:LL:CC + 2: std::thread::LocalKey::>>::with + at RUSTLIB/std/src/thread/local.rs:LL:CC + 3: main::{closure#0} + at tests/fail/tls_macro_leak.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr index 7960f42faa519..a51cf50640baa 100644 --- a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr @@ -19,13 +19,11 @@ 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` - --> tests/fail/tree_borrows/outside-range.rs:LL:CC - | -LL | stuff(&mut *raw, raw); - | ^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: stuff + at tests/fail/tree_borrows/outside-range.rs:LL:CC + 1: main + at tests/fail/tree_borrows/outside-range.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr b/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr index 9a70d248aa0c3..029b0a56f305f 100644 --- a/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr @@ -30,13 +30,11 @@ 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` - --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC - | -LL | foo(xref); - | ^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC + 1: main + at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr b/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr index 012d7caef501a..693afb133967c 100644 --- a/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr @@ -18,13 +18,11 @@ 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` - --> 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); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: access_after_sub_1 + at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC + 1: main + at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index b1c3ffe86ef7f..29397a8fd0bc7 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -29,13 +29,11 @@ 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` - --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC - | -LL | write_second(x, y); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::write_second + at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC + 1: main + at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr index 5f3129b9dc089..3bddd2ce1de63 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -29,13 +29,11 @@ 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` - --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC - | -LL | write_second(x, y); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::write_second + at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC + 1: main + at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index 15365e5c8bcc5..619e707f36f79 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index 4065c822866c6..2f14900e43e7d 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr index 8f2534d6b6e97..12c163aa87549 100644 --- a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr @@ -31,13 +31,24 @@ 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: retagx_retagy_retx_writey_rety::{closure#1}::as_mut + at tests/fail/tree_borrows/spurious_read.rs:LL:CC + 1: retagx_retagy_retx_writey_rety::{closure#1} + at tests/fail/tree_borrows/spurious_read.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | -LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +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/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr index 685abee3292f6..4abaeb66e5272 100644 --- a/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr @@ -18,28 +18,21 @@ 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 - --> 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` - --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC - | -LL | f(x) - | ^^^^ -note: inside `main` - --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC - | -LL | / inner(Box::leak(Box::new(0)), |raw| { -LL | | drop(unsafe { Box::from_raw(raw) }); -LL | | }); - | |______^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/tree_borrows/strongly-protected.rs:LL:CC + 4: <{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 + 5: inner + at tests/fail/tree_borrows/strongly-protected.rs:LL:CC + 6: main + at tests/fail/tree_borrows/strongly-protected.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr b/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr index b98d2fafcf4ee..c27db19cd3e9b 100644 --- a/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr @@ -18,13 +18,11 @@ 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` - --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC - | -LL | write_to_mut(data, core::ptr::addr_of!(root)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: write_to_mut + at tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC + 1: main + at tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr index e257a3511f75e..28deb09664c73 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr @@ -23,13 +23,11 @@ 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` - --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC - | -LL | protect(wild_ref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC + 1: main + at tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr index 5486eee4f063f..dce29e63583e9 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr @@ -7,13 +7,11 @@ 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` - --> tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC - | -LL | protect(ref1); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC + 1: main + at tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr index 6e115b22feb11..89d1f8ca556d4 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr @@ -18,28 +18,21 @@ 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 - --> 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` - --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC - | -LL | f(x as *mut i32 as usize) - | ^^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `main` - --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC - | -LL | / inner(Box::leak(Box::new(0)), |raw| { -LL | | drop(unsafe { Box::from_raw(raw as *mut i32) }); -LL | | }); - | |______^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC + 4: <{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 + 5: inner + at tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC + 6: main + at tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr b/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr index 7f55e06a6bb7a..e44f306f7fad1 100644 --- a/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr @@ -18,19 +18,11 @@ 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` - --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC - | -LL | let res = f.add(unsafe { - | _______________^ -LL | | // This is the access at fault, but it's not immediately apparent because -LL | | // the reference that got invalidated is not under a Protector. -LL | | *alias = 42; -LL | | 0 -LL | | }); - | |______^ + = note: stack backtrace: + 0: Foo::add + at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC + 1: main + at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr b/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr index ea144f206643a..2b98a2f99cf9d 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr @@ -8,13 +8,11 @@ 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` - --> tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC - | -LL | core::ptr::drop_in_place(p); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::ptr::drop_in_place - shim(Some(PartialDrop)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr index d2a5f83a43daa..ed5c724a2e2b2 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC - | -LL | foo(odd_ptr.cast()); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr index 39540fc8320d7..bd44ed1224ec8 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC - | -LL | foo(odd_ptr.cast()); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr index a91be376bd16b..2f3079383d122 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC - | -LL | let p: &i32 = unsafe { raw_to_ref(ptr::addr_of!(foo.x)) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: raw_to_ref + at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr index 25a9bddb42c7c..e0caff6a21a9d 100644 --- a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr +++ b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr @@ -6,14 +6,13 @@ 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` - --> tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC - | -LL | drop(slice1.cmp(slice2)); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: ::compare + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 1: core::slice::cmp::cmp + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 2: main + at tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC Uninitialized memory occurred at ALLOC[0x4..0x10], in this allocation: ALLOC (Rust heap, size: 32, align: 8) { diff --git a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr index 305d8d4fbede1..efad61c14fb80 100644 --- a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr +++ b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr @@ -6,14 +6,13 @@ 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` - --> tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC - | -LL | drop(slice1.cmp(slice2)); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: ::compare + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 1: core::slice::cmp::cmp + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 2: main + at tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC Uninitialized memory occurred at ALLOC[0x4..0x8], in this allocation: ALLOC (Rust heap, size: 16, align: 8) { diff --git a/src/tools/miri/tests/fail/unwind-action-terminate.stderr b/src/tools/miri/tests/fail/unwind-action-terminate.stderr index cf41c88ce3774..2295d80f45e85 100644 --- a/src/tools/miri/tests/fail/unwind-action-terminate.stderr +++ b/src/tools/miri/tests/fail/unwind-action-terminate.stderr @@ -14,25 +14,7 @@ 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` - --> tests/fail/unwind-action-terminate.rs:LL:CC - | -LL | / extern "C" fn panic_abort() { -LL | | panic!() -LL | | } - | |_^ -note: inside `main` - --> tests/fail/unwind-action-terminate.rs:LL:CC - | -LL | panic_abort(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr index c370e19ef313f..c2e647aa18fcb 100644 --- a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr +++ b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC - | -LL | call(f); - | ^^^^^^^ + = note: stack backtrace: + 0: call + at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC + 1: main + at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr b/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr index c435e51d6be81..ecccf204cf81a 100644 --- a/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/validity/invalid_char_cast.rs:LL:CC - | -LL | cast(&v as *const u32 as *const char); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: cast + at tests/fail/validity/invalid_char_cast.rs:LL:CC + 1: main + at tests/fail/validity/invalid_char_cast.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/invalid_char_match.stderr b/src/tools/miri/tests/fail/validity/invalid_char_match.stderr index 141305a001702..818b2e26f8695 100644 --- a/src/tools/miri/tests/fail/validity/invalid_char_match.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_char_match.stderr @@ -9,13 +9,11 @@ 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` - --> tests/fail/validity/invalid_char_match.rs:LL:CC - | -LL | switch_int(&v as *const u32 as *const char); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: switch_int + at tests/fail/validity/invalid_char_match.rs:LL:CC + 1: main + at tests/fail/validity/invalid_char_match.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr b/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr index b2d876419034b..a02dc678f0184 100644 --- a/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr @@ -6,13 +6,11 @@ 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` - --> tests/fail/validity/invalid_enum_cast.rs:LL:CC - | -LL | cast(&v as *const u32 as *const E); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: cast + at tests/fail/validity/invalid_enum_cast.rs:LL:CC + 1: main + at tests/fail/validity/invalid_enum_cast.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr index 99e06e7febf50..d2d6da49fc1e5 100644 --- a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr +++ b/src/tools/miri/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` +note: the current function 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/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr index 7d03bd9a8eb84..2ba64ac032a8d 100644 --- a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr +++ b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr @@ -17,19 +17,26 @@ 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 - --> 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: free + at tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC + 1: miri_start::{closure#1} + at tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC + 2: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 3: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr index bde793014bbf2..7534eaf8f37ec 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr index 7bfafe0ca086c..77e9817a55c74 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr index 0facf6a5d177c..47df94404efa3 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr @@ -17,14 +17,24 @@ 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr index 8e4ed1aba0430..e2c87b2d25e19 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr index 1ffb55f22e6e0..a3a15a71ce156 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr index b0037c211c69d..1220c0c09cbe1 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr index b0037c211c69d..1220c0c09cbe1 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr index b0037c211c69d..1220c0c09cbe1 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr @@ -7,14 +7,24 @@ 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` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr b/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr index ad98ba6aeb9a5..abda3e31189ef 100644 --- a/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr b/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr index 658914ba088d8..176ab6a573c87 100644 --- a/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr b/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr index d2036d464bb58..487ab21f28b32 100644 --- a/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/genmc/fail/shims/exit.stderr b/src/tools/miri/tests/genmc/fail/shims/exit.stderr index f27860b82fe73..c0d0321defe12 100644 --- a/src/tools/miri/tests/genmc/fail/shims/exit.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/exit.stderr @@ -7,6 +7,14 @@ LL | unsafe { std::hint::unreachable_unchecked() }; | = 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` +note: the current function got called indirectly due to this code + --> tests/genmc/fail/shims/exit.rs:LL:CC + | +LL | / std::thread::spawn(|| { +LL | | unsafe { std::hint::unreachable_unchecked() }; +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr index db465969cda81..272a52ba7fefe 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr @@ -7,16 +7,27 @@ 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` + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 3: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 4: miri_start::{closure#0} + at tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC | -LL | drop(guard); - | ^^^^^^^^^^^ +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/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr index 3ba863668f1e8..d668706f76475 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr @@ -7,15 +7,15 @@ 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` - --> tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC - | -LL | drop(guard); - | ^^^^^^^^^^^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: miri_start + at tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr index d6c66bf8f5c45..f7942d8ff749c 100644 --- a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr index d6c66bf8f5c45..f7942d8ff749c 100644 --- a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr index d6c66bf8f5c45..f7942d8ff749c 100644 --- a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr +++ b/src/tools/miri/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/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr b/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr index 1d56614c7f037..5ddcce1fa30c3 100644 --- a/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr @@ -6,17 +6,19 @@ 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` - --> tests/genmc/fail/simple/alloc_large.rs:LL:CC - | -LL | let _v = Vec::::with_capacity(1024 * 1024 * 1024); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: alloc::raw_vec::RawVecInner::try_allocate_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 1: alloc::raw_vec::RawVecInner::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 2: alloc::raw_vec::RawVec::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 3: std::vec::Vec::with_capacity_in + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 4: std::vec::Vec::with_capacity + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 5: miri_start + at tests/genmc/fail/simple/alloc_large.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr b/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr index 8595612811fd1..5ddcce1fa30c3 100644 --- a/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr @@ -6,17 +6,19 @@ 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` - --> tests/genmc/fail/simple/alloc_large.rs:LL:CC - | -LL | let _v = Vec::::with_capacity(8 * 1024 * 1024 * 1024); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: alloc::raw_vec::RawVecInner::try_allocate_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 1: alloc::raw_vec::RawVecInner::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 2: alloc::raw_vec::RawVec::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 3: std::vec::Vec::with_capacity_in + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 4: std::vec::Vec::with_capacity + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 5: miri_start + at tests/genmc/fail/simple/alloc_large.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr index 31438f9352fe6..24bde07924d1f 100644 --- a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr +++ b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr @@ -5,18 +5,25 @@ 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 - --> 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: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: get_or_init + at tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC + 1: miri_start::{closure#0} + at tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC + 2: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 3: genmc::spawn_pthread_closure::thread_func + at tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC | -LL | f(); - | ^^^ +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/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr b/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr index 1c0ad2f0dc916..032461b6ed3f6 100644 --- a/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr +++ b/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr @@ -9,13 +9,11 @@ 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` - --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC - | -LL | partial_init(); - | ^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: partial_init + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC error: Undefined Behavior: reading memory at ALLOC[0x2..0x3], but memory is uninitialized at [0x2..0x3], and this operation requires initialized memory --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC @@ -25,13 +23,11 @@ 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` - --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC - | -LL | partial_init(); - | ^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: partial_init + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC Uninitialized memory occurred at ALLOC[0x2..0x3], in this allocation: ALLOC (stack variable, size: 3, align: 1) { diff --git a/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr b/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr index 2d34dac1b3ff3..773d2dd63c3e7 100644 --- a/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr +++ b/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr @@ -9,13 +9,11 @@ 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` - --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC - | -LL | unexposed_reachable_alloc(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unexposed_reachable_alloc + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC error: Undefined Behavior: memory access failed: attempting to access 4 bytes, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC @@ -25,13 +23,11 @@ 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` - --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC - | -LL | unexposed_reachable_alloc(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unexposed_reachable_alloc + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr index 200eba8050bb5..b6bbb4342b77e 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr @@ -8,13 +8,11 @@ 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` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | test_access_pointer(); - | ^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_access_pointer + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC warning: sharing a function pointer with a native function called via FFI --> tests/native-lib/pass/ptr_read_access.rs:LL:CC @@ -23,11 +21,9 @@ 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` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | pass_fn_ptr(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: pass_fn_ptr + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr index 5c0e954deb9b6..0d86ea066099a 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr @@ -9,13 +9,11 @@ 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` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | test_access_pointer(); - | ^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_access_pointer + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC warning: sharing a function pointer with a native function called via FFI --> tests/native-lib/pass/ptr_read_access.rs:LL:CC @@ -24,11 +22,9 @@ 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` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | pass_fn_ptr(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: pass_fn_ptr + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr index c893b0d9f6561..15b2bc6df63fa 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr @@ -8,11 +8,9 @@ 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` - --> tests/native-lib/pass/ptr_write_access.rs:LL:CC - | -LL | test_increment_int(); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_increment_int + at tests/native-lib/pass/ptr_write_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_write_access.rs:LL:CC diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr index dbf021b15bec4..d12a25f84b370 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr @@ -9,11 +9,9 @@ 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` - --> tests/native-lib/pass/ptr_write_access.rs:LL:CC - | -LL | test_increment_int(); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_increment_int + at tests/native-lib/pass/ptr_write_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_write_access.rs:LL:CC diff --git a/src/tools/miri/tests/panic/panic1.stderr b/src/tools/miri/tests/panic/panic1.stderr index ff7e287b5a585..d709428f3115d 100644 --- a/src/tools/miri/tests/panic/panic1.stderr +++ b/src/tools/miri/tests/panic/panic1.stderr @@ -3,11 +3,11 @@ thread 'main' ($TID) panicked at tests/panic/panic1.rs:LL:CC: panicking from libstd stack backtrace: 0: std::panicking::panic_handler - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 1: std::rt::panic_fmt - at RUSTLIB/core/src/panicking.rs:LL:CC + at RUSTLIB/core/src/panicking.rs:LL:CC 2: main - at tests/panic/panic1.rs:LL:CC + at tests/panic/panic1.rs:LL:CC 3: >::call_once - shim(fn()) - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. diff --git a/src/tools/miri/tests/pass/alloc-access-tracking.stderr b/src/tools/miri/tests/pass/alloc-access-tracking.stderr index 745fd89f9f547..5dfcd0180e4c1 100644 --- a/src/tools/miri/tests/pass/alloc-access-tracking.stderr +++ b/src/tools/miri/tests/pass/alloc-access-tracking.stderr @@ -24,12 +24,11 @@ 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` - --> tests/pass/alloc-access-tracking.rs:LL:CC - | -LL | } - | ^ + = note: stack backtrace: + 0: > as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: main + at tests/pass/alloc-access-tracking.rs:LL:CC diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr b/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr index 588bb85f35a4f..b4ef3f76c20f7 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr +++ b/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr @@ -1,28 +1,28 @@ 0: main - at tests/pass/backtrace/backtrace-global-alloc.rs:LL:CC + at tests/pass/backtrace/backtrace-global-alloc.rs:LL:CC 1: >::call_once - shim(fn()) - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 2: std::sys::backtrace::__rust_begin_short_backtrace - at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC 3: std::rt::lang_start::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 4: std::ops::function::impls::call_once - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 5: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 6: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 7: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 8: std::rt::lang_start_internal::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 9: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 10: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 11: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 12: std::rt::lang_start_internal - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 13: std::rt::lang_start - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr b/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr index 9c952755957b1..706eacc70fd8d 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr +++ b/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr @@ -1,36 +1,36 @@ 0: func_d - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 1: func_c - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 2: func_b - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 3: func_a - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 4: main - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 5: >::call_once - shim(fn()) - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 6: std::sys::backtrace::__rust_begin_short_backtrace - at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC 7: std::rt::lang_start::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 8: std::ops::function::impls::call_once - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 9: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 10: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 11: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 12: std::rt::lang_start_internal::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 13: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 14: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 15: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 16: std::rt::lang_start_internal - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 17: std::rt::lang_start - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC diff --git a/src/tools/miri/tests/ui.rs b/src/tools/miri/tests/ui.rs index 8a3ab658b6694..70739eef28838 100644 --- a/src/tools/miri/tests/ui.rs +++ b/src/tools/miri/tests/ui.rs @@ -255,8 +255,6 @@ regexes! { "<[0-9]+=" => " "$1", - // erase whitespace that differs between platforms - r" +at (.*\.rs)" => " at $1", // erase generics in backtraces "([0-9]+: .*)::<.*>" => "$1", // erase long hexadecimals