diff options
| author | Ralf Jung <post@ralfj.de> | 2025-06-07 12:08:23 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2025-06-07 14:18:16 +0200 |
| commit | 9439f33aa6c37fde6b8a465b08451fbbd5caecfd (patch) | |
| tree | 4df99b4c6832173b8891e8a10413696ea9287238 | |
| parent | bb53df1db6eb106a91762decac54141fc8276198 (diff) | |
| download | rust-9439f33aa6c37fde6b8a465b08451fbbd5caecfd.tar.gz rust-9439f33aa6c37fde6b8a465b08451fbbd5caecfd.zip | |
make better use of label for data-race and some other errors
120 files changed, 240 insertions, 388 deletions
diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index e56648ef9e1..f36991e2101 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -85,7 +85,7 @@ impl fmt::Display for TerminationInfo { DataRace { involves_non_atomic, ptr, op1, op2, .. } => write!( f, - "{} detected between (1) {} on {} and (2) {} on {} at {ptr:?}. (2) just happened here", + "{} detected between (1) {} on {} and (2) {} on {} at {ptr:?}", if *involves_non_atomic { "Data race" } else { "Race condition" }, op1.action, op1.thread_info, @@ -224,7 +224,7 @@ pub fn report_error<'tcx>( use InterpErrorKind::*; use UndefinedBehaviorInfo::*; - let mut msg = vec![]; + let mut labels = vec![]; let (title, helps) = if let MachineStop(info) = e.kind() { let info = info.downcast_ref::<TerminationInfo>().expect("invalid MachineStop payload"); @@ -237,7 +237,10 @@ pub fn report_error<'tcx>( Some("unsupported operation"), StackedBorrowsUb { .. } | TreeBorrowsUb { .. } | DataRace { .. } => Some("Undefined Behavior"), - Deadlock => Some("deadlock"), + Deadlock => { + labels.push(format!("this thread got stuck here")); + None + } GenmcStuckExecution => { // This case should only happen in GenMC mode. We treat it like a normal program exit. assert!(ecx.machine.data_race.as_genmc_ref().is_some()); @@ -259,7 +262,7 @@ pub fn report_error<'tcx>( ] } StackedBorrowsUb { help, history, .. } => { - msg.extend(help.clone()); + labels.extend(help.clone()); let mut helps = vec![ note!("this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental"), note!("see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information"), @@ -297,6 +300,7 @@ pub fn report_error<'tcx>( Int2PtrWithStrictProvenance => vec![note!("use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead")], DataRace { op1, extra, retag_explain, .. } => { + labels.push(format!("(2) just happened here")); let mut helps = vec![note_span!(op1.span, "and (1) occurred earlier here")]; if let Some(extra) = extra { helps.push(note!("{extra}")); @@ -432,12 +436,14 @@ pub fn report_error<'tcx>( } write!(primary_msg, "{}", format_interp_error(ecx.tcx.dcx(), e)).unwrap(); - msg.insert(0, format!("{} occurred here", title.unwrap_or("error"))); + if labels.is_empty() { + labels.push(format!("{} occurred here", title.unwrap_or("error"))); + } report_msg( DiagLevel::Error, primary_msg, - msg, + labels, vec![], helps, &stacktrace, @@ -455,8 +461,8 @@ pub fn report_error<'tcx>( any_pruned |= was_pruned; report_msg( DiagLevel::Error, - format!("deadlock: the evaluated program deadlocked"), - vec![format!("the evaluated program deadlocked")], + format!("the evaluated program deadlocked"), + vec![format!("this thread got stuck here")], vec![], vec![], &stacktrace, @@ -617,7 +623,7 @@ impl<'tcx> MiriMachine<'tcx> { let stacktrace = Frame::generate_stacktrace_from_stack(self.threads.active_thread_stack()); let (stacktrace, _was_pruned) = prune_stacktrace(stacktrace, self); - let (title, diag_level) = match &e { + let (label, diag_level) = match &e { RejectedIsolatedOp(_) => ("operation rejected by isolation".to_string(), DiagLevel::Warning), Int2Ptr { .. } => ("integer-to-pointer cast".to_string(), DiagLevel::Warning), @@ -632,10 +638,10 @@ impl<'tcx> MiriMachine<'tcx> { | FreedAlloc(..) | ProgressReport { .. } | WeakMemoryOutdatedLoad { .. } => - ("tracking was triggered".to_string(), DiagLevel::Note), + ("tracking was triggered here".to_string(), DiagLevel::Note), }; - let msg = match &e { + let title = match &e { CreatedPointerTag(tag, None, _) => format!("created base tag {tag:?}"), CreatedPointerTag(tag, Some(perm), None) => format!("created {tag:?} with {perm} derived from unknown tag"), @@ -738,7 +744,7 @@ impl<'tcx> MiriMachine<'tcx> { report_msg( diag_level, title, - vec![msg], + vec![label], notes, helps, &stacktrace, 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 b38265b0c44..bcec5557a3f 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 @@ -1,17 +1,17 @@ -error: deadlock: the evaluated program deadlocked +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); - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs index 9a88639edf7..b88257992a5 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs @@ -12,6 +12,6 @@ fn main() { assert_eq!(libc::pthread_mutex_lock(&mut mutex as *mut _), 0); // A "normal" mutex properly tries to acquire the lock even if its is already held // by the current thread -- and then we deadlock. - libc::pthread_mutex_lock(&mut mutex as *mut _); //~ ERROR: deadlock: the evaluated program deadlocked + libc::pthread_mutex_lock(&mut mutex as *mut _); //~ ERROR: the evaluated program deadlocked } } 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 d55ee438661..fa0c26f987e 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut mutex as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deadlock occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs:LL:CC 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 d7e8ed38530..c88d08de555 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +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()); - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC 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 dab1cbef83f..51533cd17a8 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 @@ -1,17 +1,17 @@ -error: deadlock: the evaluated program deadlocked +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); - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC 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 f34ea4effe6..d7d9a2d3686 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +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()); - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC 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 0d676b41de8..63fc7ce346e 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 @@ -1,17 +1,17 @@ -error: deadlock: the evaluated program deadlocked +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); - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC 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 6f2a4abb849..846f1e73d08 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +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()); - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC 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 09a28fe9079..7db2338cc87 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `main` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `main` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC | LL | libc::getenv(b"TZ/0".as_ptr().cast()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC 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 e54035c0c35..4f3a56fef82 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -14,24 +14,24 @@ note: inside `main` LL | thread2.join().unwrap(); | ^^^^^^^^^^^^^^ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: -error: deadlock: the evaluated program deadlocked +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() }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: 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 5545158758b..5045badaa87 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -14,24 +14,24 @@ note: inside `main` LL | thread2.join().unwrap(); | ^^^^^^^^^^^^^^ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: -error: deadlock: the evaluated program deadlocked +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() - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: diff --git a/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs b/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs index eef32136a0a..cfebb7c6435 100644 --- a/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs +++ b/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs @@ -1,5 +1,5 @@ //@ignore-target: windows # Sockets/pipes are not implemented yet -//~^ ERROR: deadlock: the evaluated program deadlocked +//~^ ERROR: the evaluated program deadlocked //@compile-flags: -Zmiri-deterministic-concurrency use std::thread; @@ -16,5 +16,5 @@ fn main() { }); // Main thread will block on read. let _res = unsafe { libc::read(fds[0], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) }; - //~^ ERROR: deadlock: the evaluated program deadlocked + //~^ ERROR: the evaluated program deadlocked } 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 c4ff4fad1ed..41cfe78540a 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 @@ -1,14 +1,14 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: deadlock occurred here + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: -error: deadlock: the evaluated program deadlocked +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) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `main` at tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs:LL:CC 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 571ab6f2fa4..ae1d6887cb3 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `main` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `main` at ALLOC --> tests/fail-dep/libc/libc-epoll-data-race.rs:LL:CC | LL | assert_eq!({ VAL_TWO }, 51) - | ^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail-dep/libc/libc-epoll-data-race.rs:LL:CC 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 f15b5dcc185..3713c8da392 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 @@ -1,14 +1,14 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: deadlock occurred here + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -20,18 +20,18 @@ note: inside `main` LL | thread1.join().unwrap(); | ^^^^^^^^^^^^^^ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC | LL | check_epoll_wait::<TAG>(epfd, &[(expected_event, expected_value)], -1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program deadlocked + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: 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 db3abd6253d..47fc889b001 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -14,18 +14,18 @@ note: inside `main` LL | thread1.join().unwrap(); | ^^^^^^^^^^^^^^ -error: deadlock: the evaluated program deadlocked +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) - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: 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 759c123e758..7fb08fe6f10 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `main` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `main` at ALLOC --> tests/fail-dep/libc/socketpair-data-race.rs:LL:CC | LL | unsafe { assert_eq!({ VAL }, 1) }; - | ^^^ Undefined Behavior occurred here + | ^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail-dep/libc/socketpair-data-race.rs:LL:CC 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 45ff18a9ef8..9f19a60e6ae 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -14,24 +14,24 @@ note: inside `main` LL | thread2.join().unwrap(); | ^^^^^^^^^^^^^^ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_read_twice.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 + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: 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 96781d90074..b29cd70f35e 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ deadlock occurred here + | ^ this thread got stuck here | = note: BACKTRACE: = note: inside `std::sys::pal::PLATFORM::thread::Thread::join` at RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC @@ -14,24 +14,24 @@ note: inside `main` LL | thread2.join().unwrap(); | ^^^^^^^^^^^^^^ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: -error: deadlock: the evaluated program deadlocked +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 *const libc::c_void, 3) }; - | ^ the evaluated program deadlocked + | ^ this thread got stuck here | = note: BACKTRACE on thread `unnamed-ID`: = note: inside closure at tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked | - = note: the evaluated program deadlocked + = note: this thread got stuck here = note: (no span available) = note: BACKTRACE on thread `unnamed-ID`: 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 03c0cc48771..bc3db8c6801 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[OFFSET --> tests/fail/async-shared-mutable.rs:LL:CC | LL | *x = 1; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[OFFSET] + | ^^^^^^ this error occurs as part of an access at ALLOC[OFFSET] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.stack.stderr b/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.stack.stderr index de2d75c73ef..70301db0fbb 100644 --- a/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC | LL | let _val = *target_alias; - | ^^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 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 688344a76f2..0e9382be2e8 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | pub fn safe(x: &mut i32, y: &i32) { - | ^ - | | - | Undefined Behavior occurred here - | this error occurs as part of function-entry retag at ALLOC[0x0..0x4] + | ^ this error occurs as part of function-entry retag at ALLOC[0x0..0x4] | = 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 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 dd45a6a1dff..009ec2dd4aa 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr index 8ad623b9a9b..2e394297b0c 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x4], --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | v1[1] = 5; - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x4..0x8] + | ^^^^^^^^^ this error occurs as part of an access at ALLOC[0x4..0x8] | = 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 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 d52469aadbb..c4cb2c7ae4d 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 @@ -7,7 +7,6 @@ LL | | from_raw_parts_mut(ptr.offset(mid as isize), len - mid), LL | | ) | | ^ | | | - | | Undefined Behavior occurred here | |_____________this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x0..0x10] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write1.stack.stderr index d9df3146732..55046dbbe67 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write1.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/both_borrows/illegal_write1.rs:LL:CC | LL | unsafe { *x = 42 }; - | ^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write5.stack.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write5.stack.stderr index 40b0162f61f..4e39d9c083b 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write5.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write5.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/both_borrows/illegal_write5.rs:LL:CC | LL | let _val = *xref; - | ^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.stack.stderr b/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.stack.stderr index 5c5297f373a..e7915d93a26 100644 --- a/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss --> tests/fail/both_borrows/load_invalid_shr.rs:LL:CC | LL | let _val = *xref_in_mem; - | ^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x4] + | ^^^^^^^^^^^^ this error occurs as part of retag at ALLOC[0x0..0x4] | = 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 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 ddf97834aa3..3c8316ca5bc 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr index 9d1e4182a11..21690d6c4c2 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/both_borrows/mut_exclusive_violation2.rs:LL:CC | LL | let _val = *raw1; - | ^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/outdated_local.stack.stderr b/src/tools/miri/tests/fail/both_borrows/outdated_local.stack.stderr index 9e320018620..8c1de1a38f0 100644 --- a/src/tools/miri/tests/fail/both_borrows/outdated_local.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/outdated_local.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/both_borrows/outdated_local.rs:LL:CC | LL | assert_eq!(unsafe { *y }, 1); - | ^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.stack.stderr b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.stack.stderr index b56cd310016..712764d25ee 100644 --- a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss --> tests/fail/both_borrows/pass_invalid_shr.rs:LL:CC | LL | foo(xref); - | ^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x4] + | ^^^^ this error occurs as part of retag at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr index ee9d4641e91..5845f6d5077 100644 --- a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.stack.stderr @@ -4,7 +4,6 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss LL | foo(some_xref); | ^^^^^^^^^ | | - | Undefined Behavior occurred here | this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x0..0x4] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | diff --git a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr index af42188c761..41842daa947 100644 --- a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.stack.stderr @@ -4,7 +4,6 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss LL | foo(pair_xref); | ^^^^^^^^^ | | - | Undefined Behavior occurred here | this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x0..0x4] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | 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 7e89a7c88b1..d97850d7a44 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) retag write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) retag write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | ... *p = 5; - | ^^^^^^ Undefined Behavior occurred here + | ^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC 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 8d311d73860..c1b37f8a9bf 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | ... *p = 5; - | ^^^^^^ Undefined Behavior occurred here + | ^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC 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 94872f713c0..d52143500c4 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | ret - | ^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x4..0x8] + | ^^^ this error occurs as part of retag at ALLOC[0x4..0x8] | = 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 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 8d96cbc93c3..d66c8eeb1af 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 @@ -4,7 +4,6 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss LL | ret | ^^^ | | - | Undefined Behavior occurred here | this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x4..0x8] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | 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 05d2733202a..727b52ec729 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 @@ -4,7 +4,6 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss LL | ret | ^^^ | | - | Undefined Behavior occurred here | this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x4..0x8] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | 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 64fe90091a6..eed8c0273ab 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | *(x as *const i32 as *mut i32) = 7; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr index 1fb22e1e9b9..39a21e60a1b 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.stack.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/both_borrows/shr_frozen_violation2.rs:LL:CC | LL | let _val = *frozen; - | ^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/box-cell-alias.stderr b/src/tools/miri/tests/fail/box-cell-alias.stderr index 467cbd44419..8e1e9370c70 100644 --- a/src/tools/miri/tests/fail/box-cell-alias.stderr +++ b/src/tools/miri/tests/fail/box-cell-alias.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadWrite permis --> tests/fail/box-cell-alias.rs:LL:CC | LL | unsafe { (*ptr).set(20) }; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x1] + | ^^^^^^ this error occurs as part of retag at ALLOC[0x0..0x1] | = 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 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 3e055b39045..cc487c62d08 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 @@ -1,8 +1,8 @@ -error: deadlock: the evaluated program deadlocked +error: the evaluated program deadlocked --> RUSTLIB/std/$FILE:LL:CC | LL | $CODE - | ^ deadlock occurred here + | ^ this thread got stuck here | note: inside `main` --> tests/fail/concurrency/mutex-leak-move-deadlock.rs:LL:CC 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 f5eededccd0..5e4a09dd0d0 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/alloc_read_race.rs:LL:CC | LL | ... *pointer.load(Ordering::Relaxed) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/alloc_read_race.rs:LL:CC 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 eb0d2ef0f4d..69bfc33f377 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/alloc_write_race.rs:LL:CC | LL | ... *pointer.load(Ordering::Relaxed) = 2; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/alloc_write_race.rs:LL:CC 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 f6e70b50b0b..0da4914d411 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic load on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC | LL | ... (&*c.0).load(Ordering::SeqCst) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC 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 71e5f70c949..a30d3f74906 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) atomic load on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) atomic load on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC | LL | ... *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC 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 071825fd7c6..dad28c38c17 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC | LL | ... *atomic_ref.get_mut() - | ^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC 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 2d463a61200..b2b121b3188 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC | LL | ... (&*c.0).store(32, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC 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 2aef3d0b8f1..2a115cb51d6 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) atomic store on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC | LL | ... (&*c.0).store(64, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC 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 f8638a75c2d..54ad60cad1b 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) atomic store on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC | LL | ... *atomic_ref.get_mut() = 32; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC 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 82715a11cc4..0d026dddf81 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC | LL | ... *c.0 = 64; - | ^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC 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 d6f4f95c597..1c4e03a3257 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC --> tests/fail/data_race/dangling_thread_race.rs:LL:CC | LL | ... *c.0 = 64; - | ^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/dangling_thread_race.rs:LL:CC 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 7ec89c37000..55e4c4a0d9e 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 @@ -1,4 +1,4 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC | LL | / __rust_dealloc( @@ -7,7 +7,7 @@ LL | | ptr.0 as *mut _, LL | | std::mem::size_of::<usize>(), LL | | std::mem::align_of::<usize>(), LL | | ); - | |_____________^ Undefined Behavior occurred here + | |_____________^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC 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 a65b3a49494..ea8fd73393c 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC | LL | } - | ^ Undefined Behavior occurred here + | ^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC 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 c1ca55b2505..b306f181231 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 @@ -1,4 +1,4 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC | LL | / __rust_dealloc( @@ -7,7 +7,7 @@ LL | | ptr.0 as *mut _, LL | | std::mem::size_of::<usize>(), LL | | std::mem::align_of::<usize>(), LL | | ); - | |_____________^ Undefined Behavior occurred here + | |_____________^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC 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 bcf16fe44a2..f3a8707ed14 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) deallocation on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC | LL | } - | ^ Undefined Behavior occurred here + | ^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC 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 7438aafca82..c6db02fa5ae 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC | LL | ... *c.0 = 64; - | ^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC 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 58a37f15b7c..890bacd58d4 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `main` at ALLOC --> tests/fail/data_race/fence_after_load.rs:LL:CC | LL | unsafe { V = 2 } - | ^^^^^ Undefined Behavior occurred here + | ^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/fence_after_load.rs:LL:CC 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 69512a433ae..ea2bf3fc9f2 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `main` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) creating a new allocation on thread `main` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/local_variable_alloc_race.rs:LL:CC | LL | *ptr = 127; - | ^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/local_variable_alloc_race.rs:LL:CC 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 5ac68b1aba7..215842d1815 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `main` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `main` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/local_variable_read_race.rs:LL:CC | LL | *ptr = 127; - | ^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/local_variable_read_race.rs:LL:CC 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 ad309e083db..ce0c22561da 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `main` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `main` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/local_variable_write_race.rs:LL:CC | LL | *ptr = 127; - | ^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/local_variable_write_race.rs:LL:CC 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 6f98b1bcbf4..ba714868d01 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Race condition detected between (1) multiple differently-sized atomic loads, including one load on thread `unnamed-ID` and (2) 2-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Race condition detected between (1) multiple differently-sized atomic loads, including one load on thread `unnamed-ID` and (2) 2-byte atomic store on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC | LL | a16.store(0, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC 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 a4c5c6bf52d..13749cc349e 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Race condition detected between (1) multiple differently-sized atomic loads, including one load on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Race condition detected between (1) multiple differently-sized atomic loads, including one load on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC | LL | a8[0].store(0, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC 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 048b01ba40d..11c66554fae 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Race condition detected between (1) 1-byte atomic load on thread `unnamed-ID` and (2) 2-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Race condition detected between (1) 1-byte atomic load on thread `unnamed-ID` and (2) 2-byte atomic store on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC | LL | a16.store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC 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 ec30e9605be..4fa08032f44 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic load on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic load on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC | LL | a8[0].load(Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC 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 9de7e80bef5..26eddd3f193 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 @@ -1,8 +1,8 @@ -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 +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 --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC | LL | a8[idx].store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC 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 c5889ad976b..e0ca0145606 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 @@ -1,8 +1,8 @@ -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+0x1. (2) just happened here +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+0x1 --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC | LL | a8[idx].store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC 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 8627e6d0f45..c0754f6db4c 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/read_write_race.rs:LL:CC | LL | ... *c.0 = 64; - | ^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/read_write_race.rs:LL:CC 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 009ed01fa97..3f6b042de56 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/read_write_race_stack.rs:LL:CC | LL | ... stack_var - | ^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/read_write_race_stack.rs:LL:CC 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 ae9a8e94d15..fdd8971f607 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/relax_acquire_race.rs:LL:CC | LL | ... *c.0 - | ^^^^ Undefined Behavior occurred here + | ^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/relax_acquire_race.rs:LL:CC 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 565593b9209..2ee859dc45c 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/release_seq_race.rs:LL:CC | LL | ... *c.0 - | ^^^^ Undefined Behavior occurred here + | ^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/release_seq_race.rs:LL:CC 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 cc4874cc630..74b84468913 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC | LL | ... *c.0 - | ^^^^ Undefined Behavior occurred here + | ^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC 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 9fbd4f278bb..a9a97a3a3e7 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/tests/fail/data_race/rmw_race.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic read on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/rmw_race.rs:LL:CC | LL | ... *c.0 - | ^^^^ Undefined Behavior occurred here + | ^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/rmw_race.rs:LL:CC 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 37a60ffbf81..3ba949bf967 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `main` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `unnamed-ID` and (2) deallocation on thread `main` at ALLOC --> tests/fail/data_race/stack_pop_race.rs:LL:CC | LL | race(0); - | ^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/stack_pop_race.rs:LL:CC 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 cbfbcf72b7e..314ea608190 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/write_write_race.rs:LL:CC | LL | ... *c.0 = 64; - | ^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/write_write_race.rs:LL:CC 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 236768a1b04..71334019f6b 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic write on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/data_race/write_write_race_stack.rs:LL:CC | LL | ... stack_var = 1usize; - | ^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/data_race/write_write_race_stack.rs:LL:CC diff --git a/src/tools/miri/tests/fail/extern-type-field-offset.stderr b/src/tools/miri/tests/fail/extern-type-field-offset.stderr index 31c416a4831..90f104ec298 100644 --- a/src/tools/miri/tests/fail/extern-type-field-offset.stderr +++ b/src/tools/miri/tests/fail/extern-type-field-offset.stderr @@ -1,8 +1,8 @@ -warning: reborrow of reference to `extern type` +warning: reborrow of a reference to `extern type` is not properly supported --> tests/fail/extern-type-field-offset.rs:LL:CC | LL | let x: &Newtype = unsafe { &*(&buf as *const _ as *const Newtype) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow of a reference to `extern type` is not properly supported + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow of reference to `extern type` | = help: `extern type` are not compatible with the Stacked Borrows aliasing model implemented by Miri; Miri may miss bugs in this code = help: try running with `MIRIFLAGS=-Zmiri-tree-borrows` to use the more permissive but also even more experimental Tree Borrows aliasing checks instead diff --git a/src/tools/miri/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr b/src/tools/miri/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr index af5ba6e2dc2..7e9fb3f3c88 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/disable_mut_does_not_merge_srw.rs:LL:CC | LL | let _val = *raw; - | ^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 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 7d915b47ee0..32446a8e1ce 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for Unique permission at A --> RUSTLIB/core/src/ptr/mod.rs:LL:CC | LL | pub unsafe fn drop_in_place<T: ?Sized>(to_drop: *mut T) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x1] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this error occurs as part of retag at ALLOC[0x0..0x1] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/exposed_only_ro.stderr b/src/tools/miri/tests/fail/stacked_borrows/exposed_only_ro.stderr index fda3e5e1075..07662573f61 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/exposed_only_ro.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/exposed_only_ro.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <wildcard> at ALLOC[0 --> tests/fail/stacked_borrows/exposed_only_ro.rs:LL:CC | LL | unsafe { *ptr = 0 }; - | ^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation.stderr b/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation.stderr index 31504f73cd8..b4f82469a8b 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/fnentry_invalidation.rs:LL:CC | LL | let _oof = *z; - | ^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation2.stderr b/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation2.stderr index f34bcbe77aa..ad24e0fa32d 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation2.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/fnentry_invalidation2.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/fnentry_invalidation2.rs:LL:CC | LL | let _oof = *ptr; - | ^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read1.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read1.stderr index f2561a80d3a..ea9dc47460a 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read1.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read1.rs:LL:CC | LL | let _val = *xref; // ...but any use of raw will invalidate our ref. - | ^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read2.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read2.stderr index 5d2e70bfdbf..fec08275f10 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read2.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read2.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read2.rs:LL:CC | LL | let _val = *xref; // ...but any use of raw will invalidate our ref. - | ^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read3.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read3.stderr index aa7edf4b170..2ef951a6e9c 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read3.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read3.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read3.rs:LL:CC | LL | let _val = *xref2; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read4.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read4.stderr index 581b513c063..fdf5ae4297a 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read4.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read4.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read4.rs:LL:CC | LL | let _illegal = *xref2; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read5.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read5.stderr index f7ca00a521b..f1514cf4906 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read5.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read5.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[$HEX], --> tests/fail/stacked_borrows/illegal_read5.rs:LL:CC | LL | let _val = *xref; // the mutable one is dead and gone - | ^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[$HEX..$HEX] + | ^^^^^ this error occurs as part of an access at ALLOC[$HEX..$HEX] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read6.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read6.stderr index 946e60eed76..3deb458cf22 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read6.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read6.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read6.rs:LL:CC | LL | let _val = *raw; - | ^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read7.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read7.stderr index b8dff776ba3..0ed58cf775b 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read7.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read7.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadWrite permis --> tests/fail/stacked_borrows/illegal_read7.rs:LL:CC | LL | let _val = *x.get_mut(); - | ^ - | | - | Undefined Behavior occurred here - | this error occurs as part of two-phase retag at ALLOC[0x0..0x4] + | ^ this error occurs as part of two-phase retag at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read8.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read8.stderr index cb32ef9e050..7eb52d7ec3b 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read8.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read8.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read8.rs:LL:CC | LL | let _fail = *y1; - | ^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr index 922dc153684..3c6dbf7fdce 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed1.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read_despite_exposed1.rs:LL:CC | LL | let _val = *root2; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr index 5db17b4ad3d..630fbd2fd14 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_read_despite_exposed2.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_read_despite_exposed2.rs:LL:CC | LL | let _val = *root2; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.stderr index 79048703725..684e4ef1946 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_write2.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/stacked_borrows/illegal_write2.rs:LL:CC | LL | unsafe { *target2 = 13 }; - | ^^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_write3.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_write3.stderr index bdd342d0f6f..431dc4443d2 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_write3.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_write3.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/stacked_borrows/illegal_write3.rs:LL:CC | LL | unsafe { *ptr = 42 }; - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_write4.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_write4.stderr index 10d3e3abd36..954deeee77d 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_write4.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_write4.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_write4.rs:LL:CC | LL | let _val = *reference; - | ^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr b/src/tools/miri/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr index be5e6afd604..03597105e8e 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/illegal_write_despite_exposed1.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/illegal_write_despite_exposed1.rs:LL:CC | LL | let _val = *root2; - | ^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/interior_mut1.stderr b/src/tools/miri/tests/fail/stacked_borrows/interior_mut1.stderr index bb0adea34ad..76a320a819a 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/interior_mut1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/interior_mut1.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadWrite permis --> tests/fail/stacked_borrows/interior_mut1.rs:LL:CC | LL | let _val = *inner_shr.get(); - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of retag at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/interior_mut2.stderr b/src/tools/miri/tests/fail/stacked_borrows/interior_mut2.stderr index 9695b56bdf8..c7852d58b8e 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/interior_mut2.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/interior_mut2.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadWrite permis --> tests/fail/stacked_borrows/interior_mut2.rs:LL:CC | LL | let _val = *inner_shr.get(); - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of retag at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/load_invalid_mut.stderr b/src/tools/miri/tests/fail/stacked_borrows/load_invalid_mut.stderr index a00c11c3b07..ff295c4bf84 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/load_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/load_invalid_mut.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for Unique permission at A --> tests/fail/stacked_borrows/load_invalid_mut.rs:LL:CC | LL | let _val = *xref_in_mem; - | ^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x0..0x4] + | ^^^^^^^^^^^^ this error occurs as part of retag at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/pass_invalid_mut.stderr b/src/tools/miri/tests/fail/stacked_borrows/pass_invalid_mut.stderr index 6e01c40295d..382343f18db 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/pass_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/pass_invalid_mut.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadWrite permis --> tests/fail/stacked_borrows/pass_invalid_mut.rs:LL:CC | LL | foo(xref); - | ^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of two-phase retag at ALLOC[0x0..0x4] + | ^^^^ this error occurs as part of two-phase retag at ALLOC[0x0..0x4] | = 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 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 8cd0df1b2b0..b07599a500e 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | let _x = unsafe { *PTR }; - | ^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x1] + | ^^^^ this error occurs as part of an access at ALLOC[0x0..0x1] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/raw_tracking.stderr b/src/tools/miri/tests/fail/stacked_borrows/raw_tracking.stderr index dd052df30f1..479bc87e99c 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/raw_tracking.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/raw_tracking.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/stacked_borrows/raw_tracking.rs:LL:CC | LL | unsafe { *raw1 = 13 }; - | ^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 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 a9fa90f950c..561ce3164c3 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `main` and (2) retag write of type `i32` on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) non-atomic read on thread `main` and (2) retag write of type `i32` on thread `unnamed-ID` at ALLOC --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC | LL | ... retag(unsafe { &mut *ptr.0 }); - | ^^^^^^^^^^^ Undefined Behavior occurred here + | ^^^^^^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC 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 a6514264587..d84fbc76056 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC. (2) just happened here +error: Undefined Behavior: Data race detected between (1) retag read on thread `unnamed-ID` and (2) non-atomic write on thread `unnamed-ID` at ALLOC --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | *p = 5; - | ^^^^^^ Undefined Behavior occurred here + | ^^^^^^ (2) just happened here | help: and (1) occurred earlier here --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC 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 1e339425271..4ac82192a9f 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 @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for Unique permission at A --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | ret - | ^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x4..0x8] + | ^^^ this error occurs as part of retag at ALLOC[0x4..0x8] | = 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 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 5f64443d1d1..7e7670e49f1 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 @@ -4,7 +4,6 @@ error: Undefined Behavior: trying to retag from <TAG> for Unique permission at A LL | ret | ^^^ | | - | Undefined Behavior occurred here | this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x4..0x8] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | 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 257e1098005..aeaa694d292 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 @@ -4,7 +4,6 @@ error: Undefined Behavior: trying to retag from <TAG> for Unique permission at A LL | ret | ^^^ | | - | Undefined Behavior occurred here | this error occurs as part of retag (of a reference/box inside this compound value) at ALLOC[0x4..0x8] | errors for retagging in fields are fairly new; please reach out to us (e.g. at <https://rust-lang.zulipchat.com/#narrow/stream/269128-miri>) if you find this error troubling | diff --git a/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr b/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr index 2f301494b2d..ebeb721b76f 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadWrite permis --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak1.rs:LL:CC | LL | y.get_mut(); - | ^ - | | - | Undefined Behavior occurred here - | this error occurs as part of two-phase retag at ALLOC[0x0..0x4] + | ^ this error occurs as part of two-phase retag at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr b/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr index a29665e4983..79a3d391fcc 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[$HEX], --> tests/fail/stacked_borrows/shared_rw_borrows_are_weak2.rs:LL:CC | LL | let _val = *y; - | ^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[$HEX..$HEX] + | ^^ this error occurs as part of an access at ALLOC[$HEX..$HEX] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/track_caller.stderr b/src/tools/miri/tests/fail/stacked_borrows/track_caller.stderr index 7a2a76b0698..6cdaa2913ea 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/track_caller.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/track_caller.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x0], b --> tests/fail/stacked_borrows/track_caller.rs:LL:CC | LL | let _val = *xref; // ...but any use of raw will invalidate our ref. - | ^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/transmute-is-no-escape.stderr b/src/tools/miri/tests/fail/stacked_borrows/transmute-is-no-escape.stderr index bb98a9eba18..9d454f2c1e6 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/transmute-is-no-escape.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/transmute-is-no-escape.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], --> tests/fail/stacked_borrows/transmute-is-no-escape.rs:LL:CC | LL | unsafe { *raw = 13 }; - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/unescaped_local.stderr b/src/tools/miri/tests/fail/stacked_borrows/unescaped_local.stderr index 0ee392435bf..0c78dcd7c88 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/unescaped_local.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/unescaped_local.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a write access using <wildcard> at ALLOC[0 --> tests/fail/stacked_borrows/unescaped_local.rs:LL:CC | LL | *raw = 13; - | ^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x0..0x4] + | ^^^^^^^^^ this error occurs as part of an access at ALLOC[0x0..0x4] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/unescaped_static.stderr b/src/tools/miri/tests/fail/stacked_borrows/unescaped_static.stderr index 3681b4a548b..3efd6c32c93 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/unescaped_static.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/unescaped_static.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: attempting a read access using <TAG> at ALLOC[0x1], b --> tests/fail/stacked_borrows/unescaped_static.rs:LL:CC | LL | let _val = unsafe { *ptr_to_first.add(1) }; - | ^^^^^^^^^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of an access at ALLOC[0x1..0x2] + | ^^^^^^^^^^^^^^^^^^^^ this error occurs as part of an access at ALLOC[0x1..0x2] | = 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 diff --git a/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr b/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr index a28a7804ff8..021f87839e8 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/zst_slice.stderr @@ -2,10 +2,7 @@ error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permiss --> tests/fail/stacked_borrows/zst_slice.rs:LL:CC | LL | assert_eq!(*s.as_ptr().add(1), 2); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | | - | Undefined Behavior occurred here - | this error occurs as part of retag at ALLOC[0x4..0x8] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this error occurs as part of retag at ALLOC[0x4..0x8] | = 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 diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.stderr index ab40811a9d1..04a3025baef 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.stderr @@ -1,8 +1,8 @@ -warning: sharing memory with a native function +warning: sharing memory with a native function called via FFI --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | unsafe { print_pointer(&x) }; - | ^^^^^^^^^^^^^^^^^ sharing memory with a native function called via FFI + | ^^^^^^^^^^^^^^^^^ sharing memory with a native function | = help: when memory is shared with a native function call, Miri stops tracking initialization and provenance for that memory = help: in particular, Miri assumes that the native call initializes all memory it has access to diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.stderr index a059d7740ff..c893b0d9f65 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.stderr @@ -1,8 +1,8 @@ -warning: sharing memory with a native function +warning: sharing memory with a native function called via FFI --> tests/native-lib/pass/ptr_write_access.rs:LL:CC | LL | unsafe { increment_int(&mut x) }; - | ^^^^^^^^^^^^^^^^^^^^^ sharing memory with a native function called via FFI + | ^^^^^^^^^^^^^^^^^^^^^ sharing memory with a native function | = help: when memory is shared with a native function call, Miri stops tracking initialization and provenance for that memory = help: in particular, Miri assumes that the native call initializes all memory it has access to diff --git a/src/tools/miri/tests/pass/alloc-access-tracking.stderr b/src/tools/miri/tests/pass/alloc-access-tracking.stderr index 0c85afd831b..af124776402 100644 --- a/src/tools/miri/tests/pass/alloc-access-tracking.stderr +++ b/src/tools/miri/tests/pass/alloc-access-tracking.stderr @@ -1,36 +1,36 @@ -note: tracking was triggered +note: created Miri bare-metal heap allocation of 123 bytes (alignment ALIGN bytes) with id $ALLOC --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | let ptr = miri_alloc(123, 1); - | ^^^^^^^^^^^^^^^^^^ created Miri bare-metal heap allocation of 123 bytes (alignment ALIGN bytes) with id $ALLOC + | ^^^^^^^^^^^^^^^^^^ tracking was triggered here | = note: BACKTRACE: = note: inside `miri_start` at tests/pass/alloc-access-tracking.rs:LL:CC -note: tracking was triggered +note: write access to allocation with id $ALLOC --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | *ptr = 42; // Crucially, only a write is printed here, no read! - | ^^^^^^^^^ write access to allocation with id $ALLOC + | ^^^^^^^^^ tracking was triggered here | = note: BACKTRACE: = note: inside `miri_start` at tests/pass/alloc-access-tracking.rs:LL:CC -note: tracking was triggered +note: read access to allocation with id $ALLOC --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | assert_eq!(*ptr, 42); - | ^^^^^^^^^^^^^^^^^^^^ read access to allocation with id $ALLOC + | ^^^^^^^^^^^^^^^^^^^^ tracking was triggered here | = note: BACKTRACE: = note: inside `miri_start` at RUSTLIB/core/src/macros/mod.rs:LL:CC = note: this note originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) -note: tracking was triggered +note: freed allocation with id $ALLOC --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | miri_dealloc(ptr, 123, 1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^ freed allocation with id $ALLOC + | ^^^^^^^^^^^^^^^^^^^^^^^^^ tracking was triggered here | = note: BACKTRACE: = note: inside `miri_start` at tests/pass/alloc-access-tracking.rs:LL:CC diff --git a/src/tools/miri/tests/pass/extern_types.stack.stderr b/src/tools/miri/tests/pass/extern_types.stack.stderr index 898c19d514b..bd51efeb3e3 100644 --- a/src/tools/miri/tests/pass/extern_types.stack.stderr +++ b/src/tools/miri/tests/pass/extern_types.stack.stderr @@ -1,8 +1,8 @@ -warning: reborrow of reference to `extern type` +warning: reborrow of a reference to `extern type` is not properly supported --> tests/pass/extern_types.rs:LL:CC | LL | let x: &Foo = unsafe { &*(ptr::without_provenance::<()>(16) as *const Foo) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow of a reference to `extern type` is not properly supported + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow of reference to `extern type` | = help: `extern type` are not compatible with the Stacked Borrows aliasing model implemented by Miri; Miri may miss bugs in this code = help: try running with `MIRIFLAGS=-Zmiri-tree-borrows` to use the more permissive but also even more experimental Tree Borrows aliasing checks instead |
