attempt to clarify what the backtrace belongs to when there could be ambiguity

This commit is contained in:
Ralf Jung 2022-12-23 15:39:14 +01:00
parent f4165be780
commit 19422fcbfe
90 changed files with 93 additions and 90 deletions

View File

@ -362,9 +362,11 @@ fn report_msg<'tcx>(
}
// Show note and help messages.
let mut extra_span = false;
for (span_data, note) in &notes {
if let Some(span_data) = span_data {
err.span_note(span_data.span(), note);
extra_span = true;
} else {
err.note(note);
}
@ -372,13 +374,14 @@ fn report_msg<'tcx>(
for (span_data, help) in &helps {
if let Some(span_data) = span_data {
err.span_help(span_data.span(), help);
extra_span = true;
} else {
err.help(help);
}
}
if notes.len() + helps.len() > 0 {
// Add visual separator before backtrace.
err.note("BACKTRACE:");
err.note(if extra_span { "BACKTRACE (of the first span):" } else { "BACKTRACE:" });
}
// Add backtrace
for (idx, frame_info) in stacktrace.iter().enumerate() {

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x1] by a Unique retag
|
LL | let res = helper(val, ptr);
| ^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `helper` at $DIR/box-cell-alias.rs:LL:CC
note: inside `main`
--> $DIR/box-cell-alias.rs:LL:CC

View File

@ -11,7 +11,7 @@ LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relax
| ^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/alloc_read_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | .store(Box::into_raw(Box::<usize>::new_uninit()) as *mut us
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/alloc_write_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *(c.0 as *mut usize) = 32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/atomic_read_na_write_race1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | atomic_ref.load(Ordering::SeqCst)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/atomic_read_na_write_race2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | atomic_ref.store(32, Ordering::SeqCst)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/atomic_write_na_read_race1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | let _val = *(c.0 as *mut usize);
| ^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/atomic_write_na_read_race2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *(c.0 as *mut usize) = 32;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/atomic_write_na_write_race1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | atomic_ref.store(64, Ordering::SeqCst);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/atomic_write_na_write_race2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 32;
| ^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/dangling_thread_async_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 32;
| ^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/dangling_thread_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ LL | let _val = *ptr.0;
| ^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/dealloc_read_race1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *pointer.load(Ordering::Acquire)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/dealloc_read_race_stack.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ LL | *ptr.0 = 2;
| ^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/dealloc_write_race1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *pointer.load(Ordering::Acquire) = 3;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/dealloc_write_race_stack.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 32;
| ^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/enable_after_join_to_main.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | unsafe { V = 1 }
| ^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/fence_after_load.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | let _val = *c.0;
| ^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/read_write_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *pointer.load(Ordering::Acquire) = 3;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/read_write_race_stack.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 1;
| ^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/relax_acquire_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 1;
| ^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/release_seq_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 1;
| ^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/release_seq_race_same_thread.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *c.0 = 1;
| ^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/rmw_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | let _val = unsafe { *ptr.0 };
| ^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `race` at $DIR/stack_pop_race.rs:LL:CC
note: inside `main`
--> $DIR/stack_pop_race.rs:LL:CC

View File

@ -11,7 +11,7 @@ LL | *c.0 = 32;
| ^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/write_write_race.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | *pointer.load(Ordering::Acquire) = 3;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside closure at $DIR/write_write_race_stack.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: then it's defined here again, in crate `exported_symbol_clashing`
|
LL | fn bar() {}
| ^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/exported_symbol_clashing.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -12,7 +12,7 @@ LL | |
LL | | unreachable!()
LL | | }
| |_^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/exported_symbol_shim_clashing.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *target = 13;
| ^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/alias_through_mutation.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | pub fn safe(_x: &mut i32, _y: &mut i32) {}
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `safe` at $DIR/aliasing_mut1.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut1.rs:LL:CC

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | pub fn safe(_x: &i32, _y: &mut i32) {}
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `safe` at $DIR/aliasing_mut2.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut2.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique FnEntry reta
|
LL | safe_raw(xraw, xshr);
| ^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `safe` at $DIR/aliasing_mut3.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut3.rs:LL:CC

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | pub fn safe(_x: &i32, _y: &mut Cell<i32>) {}
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `safe` at $DIR/aliasing_mut4.rs:LL:CC
note: inside `main`
--> $DIR/aliasing_mut4.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *our = 5;
| ^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `unknown_code_2` at $DIR/box_exclusive_violation1.rs:LL:CC
note: inside `demo_box_advanced_unique`
--> $DIR/box_exclusive_violation1.rs:LL:CC

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | unsafe fn test(mut x: Box<i32>, y: *const i32) -> i32 {
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `test` at $DIR/box_noalias_violation.rs:LL:CC
note: inside `main`
--> $DIR/box_noalias_violation.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0xc] by a Unique retag
|
LL | unsafe { from_raw_parts_mut(self_.as_ptr() as *mut T, self_.len()) }
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/buggy_as_mut_slice.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x10] by a Unique retag
|
LL | from_raw_parts_mut(ptr.offset(mid as isize), len - mid),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/buggy_split_at_mut.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *base = 1;
| ^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/disable_mut_does_not_merge_srw.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique FnEntry reta
|
LL | x.do_bad();
| ^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/fnentry_invalidation.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0xc] by a Unique FnEntry reta
|
LL | let _ = t.sli.as_mut_ptr();
| ^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/fnentry_invalidation2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x1] by a write access
|
LL | ptr1.write(0);
| ^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `std::alloc::dealloc` at RUSTLIB/alloc/src/alloc.rs:LL:CC
note: inside `main`
--> $DIR/illegal_deALLOC.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = unsafe { *xraw };
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a SharedReadOnly reta
|
LL | let shr = unsafe { &*xraw };
| ^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = unsafe { *xref1.r };
| ^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read3.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = unsafe { *xraw }; // use the raw again, this invalidates xref2 *even* with the special read except for uniq refs
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read4.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [$HEX..$HEX] by a read access
|
LL | mem::forget(unsafe { ptr::read(xshr) }); // but after reading through the shared ref
| ^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read5.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique retag
|
LL | let x = &mut *x; // kill `raw`
| ^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read6.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = ptr::read(raw);
| ^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read7.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *y2 += 1;
| ^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read8.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *exposed_ptr = 0;
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read_despite_exposed1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = *exposed_ptr;
| ^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_read_despite_exposed2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x0..0x4]
|
LL | let x: *mut u32 = xref as *const _ as *mut _;
| ^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_write1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique retag
|
LL | drop(&mut *target); // reborrow
| ^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_write2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x0..0x4]
|
LL | let ptr = r#ref as *const _ as *mut _; // raw ptr, with raw tag
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_write3.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique retag
|
LL | let _mut_ref: &mut i32 = unsafe { mem::transmute(raw) }; // &mut, with raw tag
| ^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_write4.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | unsafe { *xraw = 15 };
| ^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_write5.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | fn foo(a: &mut u32, y: *mut u32) -> u32 {
| ^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/illegal_write6.rs:LL:CC
note: inside `main`
--> $DIR/illegal_write6.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *exposed_ptr = 0;
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/illegal_write_despite_exposed1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *c.get() = UnsafeCell::new(1); // invalidates inner_shr
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/interior_mut1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *c.get() = UnsafeCell::new(0); // now inner_shr gets invalidated
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/interior_mut2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | fn inner(x: *mut i32, _y: &mut i32) {
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `inner` at $DIR/invalidate_against_protector1.rs:LL:CC
note: inside `main`
--> $DIR/invalidate_against_protector1.rs:LL:CC

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | fn inner(x: *mut i32, _y: &i32) {
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `inner` at $DIR/invalidate_against_protector2.rs:LL:CC
note: inside `main`
--> $DIR/invalidate_against_protector2.rs:LL:CC

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | fn inner(x: *mut i32, _y: &i32) {
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `inner` at $DIR/invalidate_against_protector3.rs:LL:CC
note: inside `main`
--> $DIR/invalidate_against_protector3.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/load_invalid_mut.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | unsafe { *xraw = 42 }; // unfreeze
| ^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/load_invalid_shr.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | *our = 5;
| ^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `unknown_code_2` at $DIR/mut_exclusive_violation1.rs:LL:CC
note: inside `demo_mut_advanced_unique`
--> $DIR/mut_exclusive_violation1.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique retag
|
LL | let _raw2 = ptr2.as_mut();
| ^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/mut_exclusive_violation2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `std::boxed::Box::<i32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `std::boxed::Box::<i32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside closure

View File

@ -16,7 +16,7 @@ help: <TAG> is this argument
|
LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) {
| ^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `std::boxed::Box::<i32>::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC
= note: inside `std::boxed::Box::<i32>::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC
note: inside closure

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | x = 1; // this invalidates y by reactivating the lowermost uniq borrow for this local
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/outdated_local.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/pass_invalid_mut.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a write access
|
LL | unsafe { *xraw = 42 }; // unfreeze
| ^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/pass_invalid_shr.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x1] by a write access
|
LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created.
| ^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `fun2` at $DIR/pointer_smuggling.rs:LL:CC
note: inside `main`
--> $DIR/pointer_smuggling.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique retag
|
LL | let raw2 = &mut l as *mut _; // invalidates raw1
| ^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/raw_tracking.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -11,7 +11,7 @@ LL | let _r = &*p;
| ^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC
note: inside closure
--> $DIR/retag_data_race_read.rs:LL:CC

View File

@ -11,7 +11,7 @@ LL | let _r = &mut *p;
| ^^^^^^^
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `thread_2` at $DIR/retag_data_race_write.rs:LL:CC
note: inside closure
--> $DIR/retag_data_race_write.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x8] by a read access
|
LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/return_invalid_mut.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_mut.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x8] by a read access
|
LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/return_invalid_mut_option.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_mut_option.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x8] by a read access
|
LL | let _val = unsafe { *xraw }; // invalidate xref
| ^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/return_invalid_mut_tuple.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_mut_tuple.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x8] by a write access
|
LL | unsafe { *xraw = (42, 23) }; // unfreeze
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/return_invalid_shr.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_shr.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x8] by a write access
|
LL | unsafe { *xraw = (42, 23) }; // unfreeze
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/return_invalid_shr_option.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_shr_option.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x8] by a write access
|
LL | unsafe { *xraw = (42, 23) }; // unfreeze
| ^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `foo` at $DIR/return_invalid_shr_tuple.rs:LL:CC
note: inside `main`
--> $DIR/return_invalid_shr_tuple.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique retag
|
LL | shr_rw.set(1);
| ^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/shared_rw_borrows_are_weak1.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [$HEX..$HEX] by a Unique retag
|
LL | shr_rw.replace(1);
| ^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/shared_rw_borrows_are_weak2.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x0..0x4]
|
LL | *(x as *const i32 as *mut i32) = 7;
| ^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `unknown_code` at $DIR/shr_frozen_violation1.rs:LL:CC
note: inside `foo`
--> $DIR/shr_frozen_violation1.rs:LL:CC

View File

@ -19,7 +19,7 @@ help: <TAG> was later invalidated at offsets [0x0..0x4] by a read access
|
LL | callee(xraw);
| ^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/track_caller.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadWrite retag at offsets [0x4..0x8]
|
LL | let raw = (&mut x[1] as *mut i32).wrapping_offset(-1);
| ^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/transmute-is-no-escape.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: <TAG> was created by a SharedReadOnly retag at offsets [0x0..0x1]
|
LL | let ptr_to_first = &ARRAY[0] as *const u8;
| ^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `main` at $DIR/unescaped_static.rs:LL:CC
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

View File

@ -14,7 +14,7 @@ help: <TAG> would have been created here, but this is a zero-size retag ([0x0..0
|
LL | assert_eq!(*s.get_unchecked(1), 2);
| ^^^^^^^^^^^^^^^^^^
= note: BACKTRACE:
= note: BACKTRACE (of the first span):
= note: inside `core::slice::<impl [i32]>::get_unchecked::<usize>` at RUSTLIB/core/src/slice/mod.rs:LL:CC
note: inside `main`
--> $DIR/zst_slice.rs:LL:CC