Merge pull request #4384 from RalfJung/diag-no-repeat
diagnostics: do not repeat the entire message in the span label
This commit is contained in:
commit
e2ce96bbaa
562 changed files with 727 additions and 874 deletions
|
|
@ -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}"));
|
||||
|
|
@ -426,12 +430,20 @@ pub fn report_error<'tcx>(
|
|||
_ => {}
|
||||
}
|
||||
|
||||
msg.insert(0, format_interp_error(ecx.tcx.dcx(), e));
|
||||
let mut primary_msg = String::new();
|
||||
if let Some(title) = title {
|
||||
write!(primary_msg, "{title}: ").unwrap();
|
||||
}
|
||||
write!(primary_msg, "{}", format_interp_error(ecx.tcx.dcx(), e)).unwrap();
|
||||
|
||||
if labels.is_empty() {
|
||||
labels.push(format!("{} occurred here", title.unwrap_or("error")));
|
||||
}
|
||||
|
||||
report_msg(
|
||||
DiagLevel::Error,
|
||||
if let Some(title) = title { format!("{title}: {}", msg[0]) } else { msg[0].clone() },
|
||||
msg,
|
||||
primary_msg,
|
||||
labels,
|
||||
vec![],
|
||||
helps,
|
||||
&stacktrace,
|
||||
|
|
@ -449,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,
|
||||
|
|
@ -611,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),
|
||||
|
|
@ -626,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"),
|
||||
|
|
@ -735,7 +747,7 @@ impl<'tcx> MiriMachine<'tcx> {
|
|||
report_msg(
|
||||
diag_level,
|
||||
title,
|
||||
vec![msg],
|
||||
vec![label],
|
||||
notes,
|
||||
helps,
|
||||
&stacktrace,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: abnormal termination: called os_unfair_lock_assert_not_owner on an os_unf
|
|||
--> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
|
||||
|
|
||||
LL | libc::os_unfair_lock_assert_not_owner(lock.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_not_owner on an os_unfair_lock owned by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_not_owner.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: abnormal termination: called os_unfair_lock_assert_owner on an os_unfair_
|
|||
--> tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC
|
||||
|
|
||||
LL | libc::os_unfair_lock_assert_owner(lock.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ called os_unfair_lock_assert_owner on an os_unfair_lock not owned by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_assert_owner.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: deadlock: the evaluated program deadlocked
|
||||
error: the evaluated program deadlocked
|
||||
--> tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.rs:LL:CC
|
||||
|
|
||||
LL | unsafe { libc::os_unfair_lock_lock(lock.get()) };
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ this thread got stuck here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_move_deadlock.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: abnormal termination: attempted to lock an os_unfair_lock that is already
|
|||
--> tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC
|
||||
|
|
||||
LL | libc::os_unfair_lock_lock(lock.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to lock an os_unfair_lock that is already locked by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_reentrant.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: abnormal termination: attempted to unlock an os_unfair_lock not owned by
|
|||
--> tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC
|
||||
|
|
||||
LL | libc::os_unfair_lock_unlock(lock.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ attempted to unlock an os_unfair_lock not owned by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at tests/fail-dep/concurrency/apple_os_unfair_lock_unowned.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: using uninitialized data, but this operation requires
|
|||
--> tests/fail-dep/concurrency/libc_pthread_cond_double_destroy.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_cond_destroy(cond.as_mut_ptr());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: `pthread_cond_t` can't be moved after first use
|
|||
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_cond_destroy(cond2.as_mut_ptr());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `pthread_cond_t` can't be moved after first use
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: `pthread_cond_t` can't be moved after first use
|
|||
--> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_cond_destroy(&mut cond2 as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `pthread_cond_t` can't be moved after first use
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: using uninitialized data, but this operation requires
|
|||
--> tests/fail-dep/concurrency/libc_pthread_condattr_double_destroy.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_condattr_destroy(attr.as_mut_ptr());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
error: Undefined Behavior: calling a function with more arguments than it expected
|
||||
|
|
||||
= note: calling a function with more arguments than it expected
|
||||
= note: Undefined Behavior occurred here
|
||||
= note: (no span available)
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
error: Undefined Behavior: calling a function with fewer arguments than it requires
|
||||
|
|
||||
= note: calling a function with fewer arguments than it requires
|
||||
= note: Undefined Behavior occurred here
|
||||
= note: (no span available)
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join a detached thread
|
|||
--> tests/fail-dep/concurrency/libc_pthread_join_detached.rs:LL:CC
|
||||
|
|
||||
LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join an already joined thread
|
|||
--> tests/fail-dep/concurrency/libc_pthread_join_joined.rs:LL:CC
|
||||
|
|
||||
LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join an already joined thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join a detached thread
|
|||
--> tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC
|
||||
|
|
||||
LL | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join an already joined thread
|
|||
--> tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC
|
||||
|
|
||||
LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join an already joined thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join itself
|
|||
--> tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC
|
||||
|
|
||||
LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join itself
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to acquire default mutex already locked by the
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_NULL_reentrant.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_lock(&mut mutex as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to acquire default mutex already locked by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to acquire default mutex already locked by the
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_default_reentrant.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_lock(&mut mutex as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to acquire default mutex already locked by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: destroyed a locked mutex
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_destroy_locked.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_destroy(&mut mutex as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ destroyed a locked mutex
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: using uninitialized data, but this operation requires
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_double_destroy.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_destroy(mutex.as_mut_ptr());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: `pthread_mutex_t` can't be moved after first use
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_lock(&mut m2 as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `pthread_mutex_t` can't be moved after first use
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: `pthread_mutex_t` can't be moved after first use
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_unlock(&mut m2 as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `pthread_mutex_t` can't be moved after first use
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program deadlocked
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `main` at tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: unlocked a PTHREAD_MUTEX_NORMAL mutex that was not lo
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_normal_unlock_unlocked.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_unlock(&mut mutex as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked a PTHREAD_MUTEX_NORMAL mutex that was not locked by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to acquire default mutex already locked by the
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutex_staticinit_reentrant.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutex_lock(&mut mutex as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to acquire default mutex already locked by the current thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: Undefined Behavior: unlocked a default mutex that was not locked by the current thread
|
||||
--> tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC
|
||||
|
|
||||
LL | ...t_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked a default mutex that was not locked by the current thread
|
||||
LL | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: using uninitialized data, but this operation requires
|
|||
--> tests/fail-dep/concurrency/libc_pthread_mutexattr_double_destroy.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_mutexattr_destroy(attr.as_mut_ptr());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: destroyed a locked rwlock
|
|||
--> tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_read_locked.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_rwlock_destroy(rw.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ destroyed a locked rwlock
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: destroyed a locked rwlock
|
|||
--> tests/fail-dep/concurrency/libc_pthread_rwlock_destroy_write_locked.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_rwlock_destroy(rw.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ destroyed a locked rwlock
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: using uninitialized data, but this operation requires
|
|||
--> tests/fail-dep/concurrency/libc_pthread_rwlock_double_destroy.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_rwlock_destroy(&mut lock);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ using uninitialized data, but this operation requires initialized memory
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: unlocked an rwlock that was not locked by the active
|
|||
--> tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC
|
||||
|
|
||||
LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked an rwlock that was not locked by the active thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: unlocked an rwlock that was not locked by the active
|
|||
--> tests/fail-dep/concurrency/libc_pthread_rwlock_unlock_unlocked.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_rwlock_unlock(rw.get());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked an rwlock that was not locked by the active thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: unlocked an rwlock that was not locked by the active
|
|||
--> tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC
|
||||
|
|
||||
LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unlocked an rwlock that was not locked by the active thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: `pthread_rwlock_t` can't be moved after first use
|
|||
--> tests/fail-dep/concurrency/libx_pthread_rwlock_moved.rs:LL:CC
|
||||
|
|
||||
LL | libc::pthread_rwlock_unlock(&mut rw2 as *mut _);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ `pthread_rwlock_t` can't be moved after first use
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: trying to join a detached thread
|
|||
--> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
|
||||
|
|
||||
LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ trying to join a detached thread
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const MAIN_THREAD: HANDLE = (2i32 << 29) as HANDLE;
|
|||
fn main() {
|
||||
thread::spawn(|| {
|
||||
unsafe {
|
||||
assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock: the evaluated program deadlocked
|
||||
assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock
|
||||
}
|
||||
})
|
||||
.join()
|
||||
|
|
|
|||
|
|
@ -1,18 +1,18 @@
|
|||
error: deadlock: the evaluated program deadlocked
|
||||
error: the evaluated program deadlocked
|
||||
--> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC
|
||||
|
|
||||
LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program deadlocked
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here
|
||||
|
|
||||
= note: BACKTRACE on thread `unnamed-ID`:
|
||||
= note: inside closure at RUSTLIB/core/src/macros/mod.rs:LL:CC
|
||||
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
error: deadlock: the evaluated program deadlocked
|
||||
error: the evaluated program deadlocked
|
||||
--> RUSTLIB/std/src/sys/pal/PLATFORM/thread.rs:LL:CC
|
||||
|
|
||||
LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) };
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ fn main() {
|
|||
thread::spawn(|| {
|
||||
unsafe {
|
||||
let native = GetCurrentThread();
|
||||
assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock: the evaluated program deadlocked
|
||||
assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); //~ ERROR: deadlock
|
||||
}
|
||||
})
|
||||
.join()
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
error: deadlock: the evaluated program deadlocked
|
||||
error: the evaluated program deadlocked
|
||||
--> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC
|
||||
|
|
||||
LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0);
|
||||
| ^ the evaluated program deadlocked
|
||||
| ^ this thread got stuck here
|
||||
|
|
||||
= note: BACKTRACE on thread `unnamed-ID`:
|
||||
= note: inside closure at tests/fail-dep/concurrency/windows_join_self.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 rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) };
|
||||
| ^ 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: attempting to access 129 bytes,
|
|||
--> tests/fail-dep/libc/affinity.rs:LL:CC
|
||||
|
|
||||
LL | let err = unsafe { sched_setaffinity(PID, size_of::<cpu_set_t>() + 1, &cpuset) };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: attempting to access 129 bytes, but got ALLOC which is only 128 bytes from the end of the allocation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (2) just happened here
|
||||
|
|
||||
help: and (1) occurred earlier here
|
||||
--> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -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()) };
|
||||
| ^ 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
|
||||
|
|
@ -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`:
|
||||
|
||||
|
|
|
|||
|
|
@ -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()) };
|
||||
| ^ 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
|
||||
|
|
@ -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`:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
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/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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: cannot close stdout
|
|||
--> tests/fail-dep/libc/fs/close_stdout.rs:LL:CC
|
||||
|
|
||||
LL | libc::close(1);
|
||||
| ^^^^^^^^^^^^^^ cannot close stdout
|
||||
| ^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: writing to ALLOC which is read-only
|
|||
--> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC
|
||||
|
|
||||
LL | let _fd = unsafe { libc::mkstemp(s) };
|
||||
| ^^^^^^^^^^^^^^^^ writing to ALLOC which is read-only
|
||||
| ^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: cannot read from stdout
|
|||
--> tests/fail-dep/libc/fs/read_from_stdout.rs:LL:CC
|
||||
|
|
||||
LL | libc::read(1, bytes.as_mut_ptr() as *mut libc::c_void, 512);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot read from stdout
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: not enough variadic arguments for `open(pathname, O_C
|
|||
--> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC
|
||||
|
|
||||
LL | let _fd = unsafe { libc::open(name_ptr, libc::O_CREAT) };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not enough variadic arguments for `open(pathname, O_CREAT, ...)`: got 0, expected at least 1
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: cannot write to stdin
|
|||
--> tests/fail-dep/libc/fs/write_to_stdin.rs:LL:CC
|
||||
|
|
||||
LL | libc::write(0, bytes.as_ptr() as *const libc::c_void, 5);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot write to stdin
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
| ^^^^^^^ 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
|
||||
| ^^^^^^^ (2) just happened here
|
||||
|
|
||||
help: and (1) occurred earlier here
|
||||
--> tests/fail-dep/libc/libc-epoll-data-race.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: constructing invalid value at .value[3]: encountered
|
|||
--> tests/fail-dep/libc/libc-read-and-uninit-premature-eof.rs:LL:CC
|
||||
|
|
||||
LL | ... buf.assume_init();
|
||||
| ^^^^^^^^^^^^^^^^^ constructing invalid value at .value[3]: encountered uninitialized memory, but expected an integer
|
||||
| ^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
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
|
||||
--> 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`:
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: epoll: epoll does not support this file descriptio
|
|||
--> tests/fail-dep/libc/libc_epoll_unsupported_fd.rs:LL:CC
|
||||
|
|
||||
LL | let res = unsafe { libc::epoll_ctl(epfd0, libc::EPOLL_CTL_ADD, epfd1, &mut ev) };
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ epoll: epoll does not support this file description
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this p
|
|||
--> tests/fail-dep/libc/malloc_zero_double_free.rs:LL:CC
|
||||
|
|
||||
LL | libc::free(ptr);
|
||||
| ^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
||||
| ^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: pointer not dereferenceable: pointer must point to so
|
|||
--> tests/fail-dep/libc/memchr_null.rs:LL:CC
|
||||
|
|
||||
LL | libc::memchr(ptr::null(), 0, 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got null pointer
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: pointer not dereferenceable: pointer must point to so
|
|||
--> tests/fail-dep/libc/memcmp_null.rs:LL:CC
|
||||
|
|
||||
LL | libc::memcmp(ptr::null(), ptr::null(), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got null pointer
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: pointer not dereferenceable: pointer must point to so
|
|||
--> tests/fail-dep/libc/memcmp_zero.rs:LL:CC
|
||||
|
|
||||
LL | libc::memcmp(ptr.cast(), ptr.cast(), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got 0x2a[noalloc] which is a dangling pointer (it has no provenance)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: pointer not dereferenceable: pointer must point to so
|
|||
--> tests/fail-dep/libc/memcpy_zero.rs:LL:CC
|
||||
|
|
||||
LL | libc::memcpy(to.cast(), from.cast(), 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got 0x17[noalloc] which is a dangling pointer (it has no provenance)
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: pointer not dereferenceable: pointer must point to so
|
|||
--> tests/fail-dep/libc/memrchr_null.rs:LL:CC
|
||||
|
|
||||
LL | libc::memrchr(ptr::null(), 0, 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ pointer not dereferenceable: pointer must point to some allocation, but got null pointer
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: deallocating ALLOC, which is mmap memory, using C hea
|
|||
--> tests/fail-dep/libc/mmap_invalid_dealloc.rs:LL:CC
|
||||
|
|
||||
LL | libc::free(ptr);
|
||||
| ^^^^^^^^^^^^^^^ deallocating ALLOC, which is mmap memory, using C heap deallocation operation
|
||||
| ^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this p
|
|||
--> tests/fail-dep/libc/mmap_use_after_munmap.rs:LL:CC
|
||||
|
|
||||
LL | let _x = *(ptr as *mut u8);
|
||||
| ^^^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
||||
| ^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: incorrect layout on deallocation: ALLOC has size SIZE
|
|||
--> tests/fail-dep/libc/munmap_partial.rs:LL:CC
|
||||
|
|
||||
LL | libc::munmap(ptr, 1);
|
||||
| ^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC has size SIZE and alignment ALIGN, but gave size SIZE and alignment ALIGN
|
||||
| ^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this p
|
|||
--> tests/fail-dep/libc/posix_memalign_size_zero_double_free.rs:LL:CC
|
||||
|
|
||||
LL | libc::free(ptr);
|
||||
| ^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
||||
| ^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: `realloc` with a size of zero
|
|||
--> tests/fail-dep/libc/realloc-zero.rs:LL:CC
|
||||
|
|
||||
LL | let p2 = libc::realloc(p1, 0);
|
||||
| ^^^^^^^^^^^^^^^^^^^^ `realloc` with a size of zero
|
||||
| ^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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()) };
|
||||
| ^ 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
|
||||
|
|
@ -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`:
|
||||
|
||||
|
|
|
|||
|
|
@ -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) };
|
||||
| ^^^ 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
|
||||
| ^^^ (2) just happened here
|
||||
|
|
||||
help: and (1) occurred earlier here
|
||||
--> tests/fail-dep/libc/socketpair-data-race.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -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()) };
|
||||
| ^ 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
|
||||
|
|
@ -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`:
|
||||
|
||||
|
|
|
|||
|
|
@ -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()) };
|
||||
| ^ 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
|
||||
|
|
@ -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`:
|
||||
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: can't call foreign function `signal` on $OS
|
|||
--> tests/fail-dep/libc/unsupported_incomplete_function.rs:LL:CC
|
||||
|
|
||||
LL | libc::signal(libc::SIGPIPE, libc::SIG_IGN);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't call foreign function `signal` on $OS
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ error: abnormal termination: the program aborted execution
|
|||
--> RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
|
|
||||
LL | ABORT()
|
||||
| ^ the program aborted execution
|
||||
| ^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `std::sys::pal::PLATFORM::abort_internal` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ error: abnormal termination: the program aborted execution
|
|||
--> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC
|
||||
|
|
||||
LL | core::intrinsics::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `alloc_error_handler` at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ error: abnormal termination: the program aborted execution
|
|||
--> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC
|
||||
|
|
||||
LL | core::intrinsics::abort();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ the program aborted execution
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here
|
||||
|
|
||||
= note: BACKTRACE:
|
||||
= note: inside `panic_handler` at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: incorrect layout on deallocation: ALLOC has size 1 an
|
|||
--> tests/fail/alloc/deallocate-bad-alignment.rs:LL:CC
|
||||
|
|
||||
LL | dealloc(x, Layout::from_size_align_unchecked(1, 2));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC has size 1 and alignment ALIGN, but gave size 1 and alignment ALIGN
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: incorrect layout on deallocation: ALLOC has size 1 an
|
|||
--> tests/fail/alloc/deallocate-bad-size.rs:LL:CC
|
||||
|
|
||||
LL | dealloc(x, Layout::from_size_align_unchecked(2, 1));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC has size 1 and alignment ALIGN, but gave size 2 and alignment ALIGN
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this p
|
|||
--> tests/fail/alloc/deallocate-twice.rs:LL:CC
|
||||
|
|
||||
LL | dealloc(x, Layout::from_size_align_unchecked(1, 1));
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: deallocating ALLOC, which is Rust heap memory, using
|
|||
--> RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC
|
||||
|
|
||||
LL | FREE();
|
||||
| ^ deallocating ALLOC, which is Rust heap memory, using PLATFORM heap deallocation operation
|
||||
| ^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: can't call foreign function `__rust_alloc` on $OS
|
|||
--> tests/fail/alloc/no_global_allocator.rs:LL:CC
|
||||
|
|
||||
LL | __rust_alloc(1, 1);
|
||||
| ^^^^^^^^^^^^^^^^^^ can't call foreign function `__rust_alloc` on $OS
|
||||
| ^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this means the program tried to do something Miri does not support; it does not indicate a bug in the program
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
error: Undefined Behavior: incorrect layout on deallocation: ALLOC has size 1 and alignment ALIGN, but gave size 2 and alignment ALIGN
|
||||
--> tests/fail/alloc/reallocate-bad-size.rs:LL:CC
|
||||
|
|
||||
LL | let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ incorrect layout on deallocation: ALLOC has size 1 and alignment ALIGN, but gave size 2 and alignment ALIGN
|
||||
LL | ... let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this p
|
|||
--> tests/fail/alloc/reallocate-change-alloc.rs:LL:CC
|
||||
|
|
||||
LL | let _z = *x;
|
||||
| ^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
||||
| ^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: memory access failed: ALLOC has been freed, so this p
|
|||
--> tests/fail/alloc/reallocate-dangling.rs:LL:CC
|
||||
|
|
||||
LL | let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: ALLOC has been freed, so this pointer is dangling
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: deallocating ALLOC, which is stack variable memory, u
|
|||
--> RUSTLIB/alloc/src/boxed.rs:LL:CC
|
||||
|
|
||||
LL | self.1.deallocate(From::from(ptr.cast()), layout);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocating ALLOC, which is stack variable memory, using Rust heap deallocation operation
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: creating an allocation larger than half the address s
|
|||
--> tests/fail/alloc/too_large.rs:LL:CC
|
||||
|
|
||||
LL | __rust_alloc(bytes, 1);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ creating an allocation larger than half the address space
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: unsupported operation: creating allocation with alignment ALIGN exceeding
|
|||
--> tests/fail/alloc/unsupported_big_alignment.rs:LL:CC
|
||||
|
|
||||
LL | __rust_alloc(1, 1 << 30);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ creating allocation with alignment ALIGN exceeding rustc's maximum supported value
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^ unsupported operation occurred here
|
||||
|
|
||||
= help: this is likely not a bug in the program; it indicates that the program performed an operation that Miri does not support
|
||||
= note: BACKTRACE:
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: creating allocation with non-power-of-two alignment A
|
|||
--> tests/fail/alloc/unsupported_non_power_two_alignment.rs:LL:CC
|
||||
|
|
||||
LL | __rust_alloc(1, 3);
|
||||
| ^^^^^^^^^^^^^^^^^^ creating allocation with non-power-of-two alignment ALIGN
|
||||
| ^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
|
||||
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
| ^^^^^^
|
||||
| |
|
||||
| attempting a write access using <TAG> at ALLOC[OFFSET], but that tag does not exist in the borrow stack for this location
|
||||
| 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: write access through <TAG> at ALLOC[OFFSET] is forbid
|
|||
--> tests/fail/async-shared-mutable.rs:LL:CC
|
||||
|
|
||||
LL | *x = 1;
|
||||
| ^^^^^^ write access through <TAG> at ALLOC[OFFSET] is forbidden
|
||||
| ^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
|
||||
= help: the accessed tag <TAG> has state Frozen which forbids this child write access
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
| ^^^^^^^^^^^^^
|
||||
| |
|
||||
| attempting a read access using <TAG> at ALLOC[0x0], but that tag does not exist in the borrow stack for this location
|
||||
| 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: read access through <TAG> at ALLOC[0x0] is forbidden
|
|||
--> tests/fail/both_borrows/alias_through_mutation.rs:LL:CC
|
||||
|
|
||||
LL | let _val = *target_alias;
|
||||
| ^^^^^^^^^^^^^ read access through <TAG> at ALLOC[0x0] is forbidden
|
||||
| ^^^^^^^^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
|
||||
= help: the accessed tag <TAG> has state Disabled which forbids this child read access
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: not granting access to tag <TAG> because that would r
|
|||
--> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC
|
||||
|
|
||||
LL | pub fn safe(x: &mut i32, y: &mut i32) {
|
||||
| ^ not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected
|
||||
| ^ Undefined Behavior occurred here
|
||||
|
|
||||
= 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
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: write access through <TAG> at ALLOC[0x0] is forbidden
|
|||
--> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC
|
||||
|
|
||||
LL | *x = 1;
|
||||
| ^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden
|
||||
| ^^^^^^ Undefined Behavior occurred here
|
||||
|
|
||||
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
|
||||
= help: the accessed tag <TAG> has state Reserved (conflicted) which forbids this child write access
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ error: Undefined Behavior: not granting access to tag <TAG> because that would r
|
|||
--> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC
|
||||
|
|
||||
LL | pub fn safe(x: &i32, y: &mut i32) {
|
||||
| ^ not granting access to tag <TAG> because that would remove [SharedReadOnly for <TAG>] which is strongly protected
|
||||
| ^ Undefined Behavior occurred here
|
||||
|
|
||||
= 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
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue