From 8cd16cd18bf3259dd765e67456ee8c7095c85d98 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 7 Dec 2025 00:06:07 +0100 Subject: [PATCH 1/5] adjust how backtraces get rendered; always show thread name when there are multiple threads --- src/tools/miri/src/diagnostics.rs | 67 ++++++++++++------- ...pple_os_unfair_lock_move_with_queue.stderr | 1 + .../libc_pthread_cond_move.init.stderr | 5 +- ...thread_cond_move.static_initializer.stderr | 5 +- .../libc_pthread_join_detached.stderr | 1 + .../libc_pthread_join_joined.stderr | 1 + .../concurrency/libc_pthread_join_main.stderr | 1 + .../libc_pthread_join_multiple.stderr | 1 + .../concurrency/libc_pthread_join_self.stderr | 1 + .../libc_pthread_mutex_deadlock.stderr | 15 +++-- ...ibc_pthread_mutex_free_while_queued.stderr | 9 ++- .../libc_pthread_mutex_move.init.stderr | 5 +- ...hread_mutex_move.static_initializer.stderr | 5 +- ...libc_pthread_mutex_normal_reentrant.stderr | 2 +- ...ibc_pthread_mutex_read_while_queued.stderr | 1 + ...bc_pthread_mutex_write_while_queued.stderr | 1 + .../libc_pthread_mutex_wrong_owner.stderr | 1 + ...k_read_write_deadlock_single_thread.stderr | 2 +- ...ibc_pthread_rwlock_read_wrong_owner.stderr | 1 + ..._pthread_rwlock_write_read_deadlock.stderr | 15 +++-- ...k_write_read_deadlock_single_thread.stderr | 2 +- ...pthread_rwlock_write_write_deadlock.stderr | 15 +++-- ..._write_write_deadlock_single_thread.stderr | 2 +- ...bc_pthread_rwlock_write_wrong_owner.stderr | 1 + .../concurrency/windows_join_detached.stderr | 9 ++- .../concurrency/windows_join_main.stderr | 14 ++-- .../concurrency/windows_join_self.stderr | 15 +++-- .../libc/env-set_var-data-race.stderr | 1 + .../libc/eventfd_block_read_twice.stderr | 15 +++-- .../libc/eventfd_block_write_twice.stderr | 15 +++-- .../libc/fcntl_fsetfl_while_blocking.stderr | 4 +- .../libc/fs/mkstemp_immutable_arg.stderr | 5 +- .../fs/unix_open_missing_required_mode.stderr | 5 +- .../fail-dep/libc/libc-epoll-data-race.stderr | 1 + .../libc/libc_epoll_block_two_thread.stderr | 15 +++-- .../socketpair-close-while-blocked.stderr | 15 +++-- .../fail-dep/libc/socketpair-data-race.stderr | 1 + .../libc/socketpair_block_read_twice.stderr | 15 +++-- .../libc/socketpair_block_write_twice.stderr | 15 +++-- .../fail/alloc/alloc_error_handler.stderr | 15 ++--- .../alloc/alloc_error_handler_custom.stderr | 11 ++- .../alloc/alloc_error_handler_no_std.stderr | 11 ++- .../fail/alloc/global_system_mixup.stderr | 7 +- .../miri/tests/fail/alloc/stack_free.stderr | 9 ++- .../fail/async-shared-mutable.stack.stderr | 13 ++-- .../fail/async-shared-mutable.tree.stderr | 13 ++-- .../both_borrows/aliasing_mut1.stack.stderr | 9 ++- .../both_borrows/aliasing_mut1.tree.stderr | 9 ++- .../both_borrows/aliasing_mut2.stack.stderr | 9 ++- .../both_borrows/aliasing_mut2.tree.stderr | 9 ++- .../both_borrows/aliasing_mut3.stack.stderr | 9 ++- .../both_borrows/aliasing_mut3.tree.stderr | 9 ++- .../both_borrows/aliasing_mut4.stack.stderr | 9 ++- .../both_borrows/aliasing_mut4.tree.stderr | 15 +++-- .../box_exclusive_violation1.stack.stderr | 11 +-- .../box_exclusive_violation1.tree.stderr | 11 +-- .../box_noalias_violation.stack.stderr | 9 ++- .../box_noalias_violation.tree.stderr | 9 ++- .../buggy_split_at_mut.stack.stderr | 9 ++- .../both_borrows/illegal_write6.stack.stderr | 9 ++- .../both_borrows/illegal_write6.tree.stderr | 9 ++- ...invalidate_against_protector2.stack.stderr | 9 ++- .../invalidate_against_protector2.tree.stderr | 9 ++- ...invalidate_against_protector3.stack.stderr | 9 ++- .../invalidate_against_protector3.tree.stderr | 9 ++- .../issue-miri-1050-1.stack.stderr | 11 +-- .../issue-miri-1050-1.tree.stderr | 11 +-- .../issue-miri-1050-2.stack.stderr | 7 +- .../issue-miri-1050-2.tree.stderr | 7 +- .../mut_exclusive_violation1.stack.stderr | 11 +-- .../mut_exclusive_violation1.tree.stderr | 11 +-- .../newtype_pair_retagging.stack.stderr | 15 +++-- .../newtype_pair_retagging.tree.stderr | 17 +++-- .../newtype_retagging.stack.stderr | 15 +++-- .../newtype_retagging.tree.stderr | 17 +++-- .../retag_data_race_write.stack.stderr | 9 ++- .../retag_data_race_write.tree.stderr | 9 ++- .../return_invalid_shr.stack.stderr | 9 ++- .../return_invalid_shr.tree.stderr | 9 ++- .../return_invalid_shr_option.stack.stderr | 9 ++- .../return_invalid_shr_option.tree.stderr | 9 ++- .../return_invalid_shr_tuple.stack.stderr | 9 ++- .../return_invalid_shr_tuple.tree.stderr | 9 ++- .../shr_frozen_violation1.stack.stderr | 11 +-- .../shr_frozen_violation1.tree.stderr | 11 +-- .../miri/tests/fail/box-cell-alias.stderr | 9 ++- .../fail/closures/uninhabited-variant.stderr | 5 +- .../concurrency/mutex-leak-move-deadlock.rs | 2 +- .../mutex-leak-move-deadlock.stderr | 4 +- .../tests/fail/coroutine-pinned-moved.stderr | 13 ++-- .../dangling_pointer_to_raw_pointer.stderr | 5 +- .../storage_dead_dangling.stderr | 5 +- .../fail/data_race/alloc_read_race.stderr | 1 + .../fail/data_race/alloc_write_race.stderr | 1 + .../atomic_read_na_write_race1.stderr | 1 + .../atomic_read_na_write_race2.stderr | 1 + .../atomic_write_na_read_race1.stderr | 1 + .../atomic_write_na_read_race2.stderr | 1 + .../atomic_write_na_write_race1.stderr | 1 + .../atomic_write_na_write_race2.stderr | 1 + .../dangling_thread_async_race.stderr | 1 + .../data_race/dangling_thread_race.stderr | 1 + .../fail/data_race/dealloc_read_race1.stderr | 1 + .../fail/data_race/dealloc_read_race2.stderr | 1 + .../data_race/dealloc_read_race_stack.stderr | 1 + .../fail/data_race/dealloc_write_race1.stderr | 1 + .../fail/data_race/dealloc_write_race2.stderr | 1 + .../data_race/dealloc_write_race_stack.stderr | 1 + .../enable_after_join_to_main.stderr | 1 + .../fail/data_race/fence_after_load.stderr | 1 + .../local_variable_alloc_race.stderr | 1 + .../data_race/local_variable_read_race.stderr | 1 + .../local_variable_write_race.stderr | 1 + ...ze_read_read_write.match_first_load.stderr | 1 + ...e_read_read_write.match_second_load.stderr | 1 + .../mixed_size_read_write.read_write.stderr | 1 + .../mixed_size_read_write.write_read.stderr | 1 + .../mixed_size_read_write_read.stderr | 1 + .../mixed_size_write_write.fst.stderr | 1 + .../mixed_size_write_write.snd.stderr | 1 + .../fail/data_race/read_write_race.stderr | 1 + .../data_race/read_write_race_stack.stderr | 1 + .../fail/data_race/relax_acquire_race.stderr | 1 + .../fail/data_race/release_seq_race.stderr | 1 + .../release_seq_race_same_thread.stderr | 1 + .../miri/tests/fail/data_race/rmw_race.stderr | 1 + .../fail/data_race/stack_pop_race.stderr | 1 + .../fail/data_race/write_write_race.stderr | 1 + .../data_race/write_write_race_stack.stderr | 1 + ...et-discriminant-niche-variant-wrong.stderr | 5 +- .../arg_inplace_mutate.stack.stderr | 9 ++- .../arg_inplace_mutate.tree.stderr | 9 ++- .../arg_inplace_observe_during.none.stderr | 5 +- .../arg_inplace_observe_during.stack.stderr | 9 ++- .../arg_inplace_observe_during.tree.stderr | 9 ++- .../exported_symbol_bad_unwind2.both.stderr | 17 +++-- ...orted_symbol_bad_unwind2.definition.stderr | 17 +++-- .../return_pointer_aliasing_read.none.stderr | 5 +- .../return_pointer_aliasing_read.stack.stderr | 9 ++- .../return_pointer_aliasing_read.tree.stderr | 9 ++- ...return_pointer_aliasing_write.stack.stderr | 9 ++- .../return_pointer_aliasing_write.tree.stderr | 9 ++- ...nter_aliasing_write_tail_call.stack.stderr | 9 ++- ...inter_aliasing_write_tail_call.tree.stderr | 9 ++- .../simd_feature_flag_difference.stderr | 5 +- .../ptr_metadata_uninit_slice_data.stderr | 5 +- .../ptr_metadata_uninit_slice_len.stderr | 5 +- .../ptr_metadata_uninit_thin.stderr | 5 +- .../typed-swap-invalid-array.stderr | 5 +- .../typed-swap-invalid-scalar.left.stderr | 5 +- .../typed-swap-invalid-scalar.right.stderr | 5 +- .../miri/tests/fail/issue-miri-1112.stderr | 5 +- src/tools/miri/tests/fail/memleak_rc.stderr | 5 +- .../tests/fail/never_transmute_void.stderr | 5 +- .../tests/fail/overlapping_assignment.stderr | 5 +- .../miri/tests/fail/panic/abort_unwind.stderr | 17 +++-- .../miri/tests/fail/panic/bad_unwind.stderr | 11 ++- .../miri/tests/fail/panic/double_panic.stderr | 15 ++--- src/tools/miri/tests/fail/panic/no_std.stderr | 5 +- .../miri/tests/fail/panic/panic_abort1.stderr | 17 +++-- .../miri/tests/fail/panic/panic_abort2.stderr | 17 +++-- .../miri/tests/fail/panic/panic_abort3.stderr | 17 +++-- .../miri/tests/fail/panic/panic_abort4.stderr | 17 +++-- .../provenance/provenance_transmute.stderr | 5 +- .../tests/fail/ptr_swap_nonoverlapping.stderr | 11 ++- .../tests/fail/shims/fs/isolated_file.stderr | 25 ++++--- .../tests/fail/shims/isolated_stdin.stderr | 2 +- .../deallocate_against_protector1.stderr | 15 ++--- .../drop_in_place_protector.stderr | 13 ++-- .../drop_in_place_retag.stderr | 11 ++- .../invalidate_against_protector1.stderr | 9 ++- .../stacked_borrows/pointer_smuggling.stderr | 9 ++- .../retag_data_race_protected_read.stderr | 1 + .../retag_data_race_read.stderr | 9 ++- .../stacked_borrows/return_invalid_mut.stderr | 9 ++- .../return_invalid_mut_option.stderr | 9 ++- .../return_invalid_mut_tuple.stderr | 9 ++- .../tests/fail/tail_calls/cc-mismatch.stderr | 27 ++++---- .../fail/tail_calls/dangling-local-var.stderr | 9 ++- .../tests/fail/terminate-terminator.stderr | 19 +++--- .../tests/fail/tls/tls_static_dealloc.stderr | 1 + .../miri/tests/fail/tls_macro_leak.stderr | 9 ++- .../fail/tree_borrows/outside-range.stderr | 9 ++- .../fail/tree_borrows/pass_invalid_mut.stderr | 9 ++- ...peated_foreign_read_lazy_conflicted.stderr | 9 ++- .../reserved/cell-protected-write.stderr | 9 ++- .../reserved/int-protected-write.stderr | 9 ++- .../reservedim_spurious_write.with.stderr | 1 + .../reservedim_spurious_write.without.stderr | 1 + .../fail/tree_borrows/spurious_read.stderr | 9 ++- .../tree_borrows/strongly-protected.stderr | 19 +++--- ...tree_traversal_skipping_diagnostics.stderr | 9 ++- .../wildcard/protected_wildcard.stderr | 9 ++- .../wildcard/protector_conflicted.stderr | 5 +- .../strongly_protected_wildcard.stderr | 19 +++--- .../tree_borrows/write-during-2phase.stderr | 9 ++- .../unaligned_pointers/drop_in_place.stderr | 5 +- ...ld_requires_parent_struct_alignment.stderr | 5 +- ...d_requires_parent_struct_alignment2.stderr | 5 +- .../reference_to_packed.stderr | 5 +- .../uninit/uninit_alloc_diagnostic.stderr | 7 +- ...it_alloc_diagnostic_with_provenance.stderr | 7 +- .../tests/fail/unwind-action-terminate.stderr | 17 +++-- .../cast_fn_ptr_invalid_caller_arg.stderr | 5 +- .../fail/validity/invalid_char_cast.stderr | 5 +- .../fail/validity/invalid_char_match.stderr | 5 +- .../fail/validity/invalid_enum_cast.stderr | 5 +- .../tests/fail/weak_memory/weak_uninit.stderr | 1 + .../atomics/atomic_ptr_double_free.stderr | 13 ++-- .../atomic_ptr_alloc_race.dealloc.stderr | 7 +- .../atomic_ptr_alloc_race.write.stderr | 7 +- .../atomic_ptr_dealloc_write_race.stderr | 11 +-- .../atomic_ptr_write_dealloc_race.stderr | 7 +- .../genmc/fail/data_race/mpu2_rels_rlx.stderr | 7 +- .../data_race/weak_orderings.rel_rlx.stderr | 7 +- .../data_race/weak_orderings.rlx_acq.stderr | 7 +- .../data_race/weak_orderings.rlx_rlx.stderr | 7 +- .../tests/genmc/fail/loom/buggy_inc.stderr | 2 + .../fail/loom/store_buffering.genmc.stderr | 2 + .../loom/store_buffering.non_genmc.stderr | 2 + .../shims/mutex_diff_thread_unlock.stderr | 11 ++- .../fail/shims/mutex_double_unlock.stderr | 9 ++- .../fail/simple/2w2w_weak.relaxed4.stderr | 2 + .../fail/simple/2w2w_weak.release4.stderr | 2 + .../fail/simple/2w2w_weak.sc3_rel1.stderr | 2 + .../fail/simple/alloc_large.multiple.stderr | 13 ++-- .../fail/simple/alloc_large.single.stderr | 13 ++-- .../cas_failure_ord_racy_key_init.stderr | 9 ++- .../fail/tracing/partial_init.stderr | 10 ++- .../tracing/unexposed_reachable_alloc.stderr | 10 ++- .../pass/ptr_read_access.notrace.stderr | 10 ++- .../pass/ptr_read_access.trace.stderr | 10 ++- .../pass/ptr_write_access.notrace.stderr | 5 +- .../pass/ptr_write_access.trace.stderr | 5 +- .../tests/pass/alloc-access-tracking.stderr | 7 +- 235 files changed, 1000 insertions(+), 768 deletions(-) diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 10467fa79d9e7..fb4029d104544 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -250,7 +250,7 @@ pub fn report_result<'tcx>( StackedBorrowsUb { .. } | TreeBorrowsUb { .. } | DataRace { .. } => Some("Undefined Behavior"), LocalDeadlock => { - labels.push(format!("this thread got stuck here")); + labels.push(format!("thread got stuck here")); None } GlobalDeadlock => { @@ -264,10 +264,7 @@ pub fn report_result<'tcx>( report_msg( DiagLevel::Error, format!("the evaluated program deadlocked"), - vec![format!( - "thread `{}` got stuck here", - ecx.machine.threads.get_thread_display_name(thread) - )], + vec![format!("thread got stuck here")], vec![], vec![], &stacktrace, @@ -563,6 +560,7 @@ fn report_msg<'tcx>( None => match thread { Some(thread_id) => machine.threads.thread_ref(thread_id).origin_span, + // This fallback is super rare, but can happen e.g. when `main` has the wrong ABI None => DUMMY_SP, }, }; @@ -608,36 +606,53 @@ fn report_msg<'tcx>( } // Add backtrace - if stacktrace.len() > 1 { - let mut backtrace_title = String::from("BACKTRACE"); - if extra_span { - write!(backtrace_title, " (of the first span)").unwrap(); + if let Some((first, rest)) = stacktrace.split_first() { + // Start with the function and thread that contain the first span. + let mut fn_and_thread = String::new(); + // Only print thread name if there are multiple threads. + if let Some(thread) = thread + && machine.threads.get_total_thread_count() > 1 + { + write!( + fn_and_thread, + "on thread `{}`", + machine.threads.get_thread_display_name(thread) + ) + .unwrap(); + } + // Only print function name if we show a backtrace + if rest.len() > 0 { + if !fn_and_thread.is_empty() { + fn_and_thread.push_str(", "); + } + write!(fn_and_thread, "{first}").unwrap(); } - if let Some(thread) = thread { - let thread_name = machine.threads.get_thread_display_name(thread); - if thread_name != "main" { - // Only print thread name if it is not `main`. - write!(backtrace_title, " on thread `{thread_name}`").unwrap(); - }; + if !fn_and_thread.is_empty() { + if extra_span && rest.len() > 0 { + // Print a `span_note` as otherwise the backtrace looks attached to the last + // `span_help`. We somewhat arbitrarily use the span of the surrounding function. + err.span_note( + machine.tcx.def_span(first.instance.def_id()), + format!("{level} occurred {fn_and_thread}"), + ); + } else { + err.note(format!("this is {fn_and_thread}")); + } } - write!(backtrace_title, ":").unwrap(); - err.note(backtrace_title); - for (idx, frame_info) in stacktrace.iter().enumerate() { + // Continue with where that function got called. + for frame_info in rest.iter() { let is_local = machine.is_local(frame_info.instance); // No span for non-local frames and the first frame (which is the error site). - if is_local && idx > 0 { - err.subdiagnostic(frame_info.as_note(machine.tcx)); + if is_local { + err.span_note(frame_info.span, format!("which got called {frame_info}")); } else { let sm = sess.source_map(); let span = sm.span_to_diagnostic_string(frame_info.span); - err.note(format!("{frame_info} at {span}")); + err.note(format!("which got called {frame_info} (at {span})")); } } - } else if stacktrace.len() == 0 && !span.is_dummy() { - err.note(format!( - "this {} occurred while pushing a call frame onto an empty stack", - level.to_str() - )); + } else if !span.is_dummy() { + err.note(format!("this {level} occurred while pushing a call frame onto an empty stack")); err.note("the span indicates which code caused the function to be called, but may not be the literal call site"); } diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr index 003ddb9b287d2..e86395fae201a 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr @@ -6,6 +6,7 @@ LL | let _val = atomic_ref.load(Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr index f3f64a60a89bb..4507c1bfa227e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_cond_destroy(cond2.as_mut_ptr()); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC | LL | check() diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr index 4056f7d9d41b5..6132785b13dda 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_cond_destroy(&mut cond2 as *mut _); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC | LL | check() diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr index 618584a117e48..60c4bd7f05897 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_detached.stderr @@ -6,6 +6,7 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr index a9f16a96adc28..87eed26bcaa3e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_joined.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index 46c9c5d3d714d..85d7fae892d19 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr index 8a16f82a93072..72c778fd0beb9 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr index dec0139bd89a1..250b9ef9dfa1c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr @@ -6,6 +6,7 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr index e3b0036c9aa9b..db4811b52a3a1 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | / thread::spawn(move || { @@ -21,7 +20,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr index 7b6e05828cea3..cd6f6563469e9 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr @@ -6,11 +6,10 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure + = note: this is on thread `unnamed-ID`, inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC | LL | drop(unsafe { Box::from_raw(m.get().cast::()) }); diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr index a7cba0f00fe97..f9e06c75e06df 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_mutex_lock(&mut m2 as *mut _); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | check(); diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr index 71f71efa0d96b..643518c606175 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr @@ -6,9 +6,8 @@ LL | libc::pthread_mutex_unlock(&mut m2 as *mut _); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `check` at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC -note: inside `main` + = note: this is inside `check` +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC | LL | check(); diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr index 782322d5c32b3..d7c69e0884610 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.stderr @@ -2,7 +2,7 @@ error: a thread deadlocked --> tests/fail-dep/concurrency/libc_pthread_mutex_normal_reentrant.rs:LL:CC | LL | libc::pthread_mutex_lock(&mut mutex as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ this thread got stuck here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr index 42dbd5f02cb3b..6b46b6f1a7f9c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr @@ -6,6 +6,7 @@ LL | ... let _val = atomic_ref.load(Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr index 4705f9a1b5f02..641150a9d31ed 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr @@ -6,6 +6,7 @@ LL | atomic_ref.store(0, Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index c7d858a444cc0..39765c8ec830c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0 | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr index ea8cbcada970d..57bd956dd3aa7 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.stderr @@ -2,7 +2,7 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_write_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_wrlock(rw.get()); - | ^ thread `main` got stuck here + | ^ thread got stuck here note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr index f1f5c50baf479..3b90bd446e54d 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr index 255632870efc8..c1722e33b6157 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | / thread::spawn(move || { @@ -21,7 +20,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr index 0208a5bae4f52..e6b6926235909 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.stderr @@ -2,7 +2,7 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_rdlock(rw.get()); - | ^ thread `main` got stuck here + | ^ thread got stuck here note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index 6891b989d05f8..ce1e0d83c7724 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | / thread::spawn(move || { @@ -21,7 +20,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr index 314e60b023607..25435eadd735b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.stderr @@ -2,7 +2,7 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock_single_thread.rs:LL:CC | LL | libc::pthread_rwlock_wrlock(rw.get()); - | ^ thread `main` got stuck here + | ^ thread got stuck here note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index fdf4297c56ae9..0a4037305c77e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr @@ -6,6 +6,7 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr index 52affb767db51..1765f0a18041b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -6,11 +6,10 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC | LL | thread.join().unwrap(); diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr index d9cc93d0fc495..d07f16eb6a997 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | / thread::spawn(|| { @@ -22,8 +21,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread `unnamed-ID` got stuck here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here | + = note: this is on thread `unnamed-ID` = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr index f5515983da2b4..d82e273677e4d 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | / thread::spawn(|| { @@ -24,7 +23,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr index 2b10a322b0be5..c326bb8c3c3f9 100644 --- a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr @@ -11,6 +11,7 @@ LL | env::set_var("MY_RUST_VAR", "Ferris"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr index 53ae7ea82bd95..dc34f4748cd27 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC | LL | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8).try_into().unwrap() }; - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr index 62810f17be887..3758484bb05e9 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC | LL | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8).try_into().unwrap() - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr b/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr index 307762fb12c63..f2f6f373a2a75 100644 --- a/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fcntl_fsetfl_while_blocking.stderr @@ -2,7 +2,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/fcntl_fsetfl_while_blocking.rs:LL:CC | LL | let _res = unsafe { libc::read(fds[0], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr b/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr index 981f055e12946..ec7b681dfad41 100644 --- a/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr @@ -6,9 +6,8 @@ LL | let _fd = unsafe { libc::mkstemp(s) }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `test_mkstemp_immutable_arg` at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC -note: inside `main` + = note: this is inside `test_mkstemp_immutable_arg` +note: which got called inside `main` --> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC | LL | test_mkstemp_immutable_arg(); diff --git a/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr b/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr index 298e67f1468b6..9f5ea4ed021f8 100644 --- a/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr @@ -6,9 +6,8 @@ LL | let _fd = unsafe { libc::open(name_ptr, libc::O_CREAT) }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `test_file_open_missing_needed_mode` at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC -note: inside `main` + = note: this is inside `test_file_open_missing_needed_mode` +note: which got called inside `main` --> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC | LL | test_file_open_missing_needed_mode(); diff --git a/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr index a322de74b510a..e606a03e46fa1 100644 --- a/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr +++ b/src/tools/miri/tests/fail-dep/libc/libc-epoll-data-race.stderr @@ -11,6 +11,7 @@ LL | unsafe { VAL_TWO = 51 }; | ^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr index dba12d1903170..e883bd9bd0257 100644 --- a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr +++ b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC | LL | check_epoll_wait::(epfd, &expected, -1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread `unnamed-ID` got stuck here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr index a7c660e1adcc3..a7d0b60dfcb32 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC | LL | thread1.join().unwrap(); @@ -18,7 +17,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC | LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr index 7cee4b83ba906..fa7e45bccdc5a 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair-data-race.stderr @@ -11,6 +11,7 @@ LL | unsafe { VAL = 1 }; | ^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr index faab75f7840b6..a817f2867284e 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC | LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr index 9f95d98beb6f0..18e6222589f00 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr @@ -2,13 +2,12 @@ error: the evaluated program deadlocked --> RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC | LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; - | ^ thread `main` got stuck here + | ^ thread got stuck here | - = note: BACKTRACE: - = note: inside `std::sys::thread::PLATFORM::Thread::join` at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC - = note: inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC - = note: inside `std::thread::JoinHandle::<()>::join` at RUSTLIB/std/src/thread/join_handle.rs:LL:CC -note: inside `main` + = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` + = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) + = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) +note: which got called inside `main` --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC | LL | thread2.join().unwrap(); @@ -18,7 +17,9 @@ error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC | LL | let res = unsafe { libc::write(fds[0], data.as_ptr() as *const libc::c_void, data.len()) }; - | ^ thread `unnamed-ID` got stuck here + | ^ thread got stuck here + | + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr index b85a23e3c7db1..bd62bf148d7a4 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr @@ -7,14 +7,13 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort() | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside closure at RUSTLIB/std/src/alloc.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::alloc::rust_oom::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::alloc::rust_oom` at RUSTLIB/std/src/alloc.rs:LL:CC - = note: inside `std::alloc::_::__rust_alloc_error_handler` at RUSTLIB/std/src/alloc.rs:LL:CC - = note: inside `std::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `std::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `main` + = note: this is inside closure + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::alloc::rust_oom::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::alloc::rust_oom` (at RUSTLIB/std/src/alloc.rs:LL:CC) + = note: which got called inside `std::alloc::_::__rust_alloc_error_handler` (at RUSTLIB/std/src/alloc.rs:LL:CC) + = note: which got called inside `std::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `std::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) +note: which got called inside `main` --> tests/fail/alloc/alloc_error_handler.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr index f8a96758aa2d3..7e7871dc89bca 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr @@ -5,18 +5,17 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `alloc_error_handler` at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC -note: inside `_::__rust_alloc_error_handler` + = note: this is inside `alloc_error_handler` +note: which got called inside `_::__rust_alloc_error_handler` --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | #[alloc_error_handler] | ---------------------- in this attribute macro expansion LL | fn alloc_error_handler(layout: Layout) -> ! { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `alloc::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `alloc::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `miri_start` + = note: which got called inside `alloc::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `alloc::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) +note: which got called inside `miri_start` --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr index 488b1d879e874..b126cb042beea 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr @@ -7,12 +7,11 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `panic_handler` at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC - = note: inside `alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `alloc::alloc::handle_alloc_error::rt_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC - = note: inside `alloc::alloc::handle_alloc_error` at RUSTLIB/alloc/src/alloc.rs:LL:CC -note: inside `miri_start` + = note: this is inside `panic_handler` + = note: which got called inside `alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `alloc::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) + = note: which got called inside `alloc::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) +note: which got called inside `miri_start` --> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC | LL | handle_alloc_error(Layout::for_value(&0)); diff --git a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr index 5a5f7496237c3..27464a5a29e8c 100644 --- a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr +++ b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr @@ -6,10 +6,9 @@ LL | FREE(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `std::sys::alloc::PLATFORM::::dealloc` at RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC - = note: inside `::deallocate` at RUSTLIB/std/src/alloc.rs:LL:CC -note: inside `main` + = note: this is inside `std::sys::alloc::PLATFORM::::dealloc` + = note: which got called inside `::deallocate` (at RUSTLIB/std/src/alloc.rs:LL:CC) +note: which got called inside `main` --> tests/fail/alloc/global_system_mixup.rs:LL:CC | LL | unsafe { System.deallocate(ptr, l) }; diff --git a/src/tools/miri/tests/fail/alloc/stack_free.stderr b/src/tools/miri/tests/fail/alloc/stack_free.stderr index 6e98a7abc7600..ec052fcb6b9af 100644 --- a/src/tools/miri/tests/fail/alloc/stack_free.stderr +++ b/src/tools/miri/tests/fail/alloc/stack_free.stderr @@ -6,11 +6,10 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside `main` + = note: this is inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside `main` --> tests/fail/alloc/stack_free.rs:LL:CC | LL | drop(bad_box); diff --git a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr index bc3db8c6801b0..9949dad128674 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr @@ -20,15 +20,18 @@ help: was later invalidated at offsets [OFFSET] by a SharedReadOnly retag | LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/async-shared-mutable.rs:LL:CC - = note: inside ` as std::future::Future>::poll` at RUSTLIB/core/src/future/poll_fn.rs:LL:CC -note: inside closure +note: error occurred inside closure + --> tests/fail/async-shared-mutable.rs:LL:CC + | +LL | core::future::poll_fn(move |_| { + | ^^^^^^^^ + = note: which got called inside ` as std::future::Future>::poll` (at RUSTLIB/core/src/future/poll_fn.rs:LL:CC) +note: which got called inside closure --> tests/fail/async-shared-mutable.rs:LL:CC | LL | .await | ^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/async-shared-mutable.rs:LL:CC | LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); diff --git a/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr b/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr index dc8b4f6665a03..c204f75c4f21b 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr @@ -28,15 +28,18 @@ help: the accessed tag later transitioned to Frozen due to a reborrow (act LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ^^^^^^^^^^ = help: this transition corresponds to a loss of write permissions - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/async-shared-mutable.rs:LL:CC - = note: inside ` as std::future::Future>::poll` at RUSTLIB/core/src/future/poll_fn.rs:LL:CC -note: inside closure +note: error occurred inside closure + --> tests/fail/async-shared-mutable.rs:LL:CC + | +LL | core::future::poll_fn(move |_| { + | ^^^^^^^^ + = note: which got called inside ` as std::future::Future>::poll` (at RUSTLIB/core/src/future/poll_fn.rs:LL:CC) +note: which got called inside closure --> tests/fail/async-shared-mutable.rs:LL:CC | LL | .await | ^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/async-shared-mutable.rs:LL:CC | LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr index 196eaeb3fb6c2..bb5e731545b7c 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn safe(x: &mut i32, y: &mut i32) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr index b9e6e25478062..34f56696e0003 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | fn safe(x: &mut i32, y: &mut i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC | LL | safe_raw(xraw, xraw); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr index e70e5b10793c1..5c574f13ff70a 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn safe(x: &i32, y: &mut i32) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + | +LL | fn safe(x: &i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr index aed59b21f1379..639a4ef57efeb 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | let _v = *x; | ^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + | +LL | fn safe(x: &i32, y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC | LL | safe_raw(xshr, xraw); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr index 9980d14e10549..4be06c65f1912 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique function-ent | LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr index 357d7d220192a..09a54f8199c7f 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | fn safe(x: &mut i32, y: &i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + | +LL | fn safe(x: &mut i32, y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC | LL | safe_raw(xraw, xshr); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr index eb2514df588a6..e72996d43d7b3 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn safe(x: &i32, y: &mut Cell) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `safe` at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC -note: inside `main` +note: error occurred inside `safe` + --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC + | +LL | fn safe(x: &i32, y: &mut Cell) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr index c06ae0e92138e..d2a533a3da8e4 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr @@ -19,16 +19,19 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn safe(x: &i32, y: &mut Cell) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `std::mem::replace::` at RUSTLIB/core/src/mem/mod.rs:LL:CC - = note: inside `std::cell::Cell::::replace` at RUSTLIB/core/src/cell.rs:LL:CC - = note: inside `std::cell::Cell::::set` at RUSTLIB/core/src/cell.rs:LL:CC -note: inside `safe` +note: error occurred inside `std::mem::replace::` + --> RUSTLIB/core/src/mem/mod.rs:LL:CC + | +LL | pub const fn replace(dest: &mut T, src: T) -> T { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::cell::Cell::::replace` (at RUSTLIB/core/src/cell.rs:LL:CC) + = note: which got called inside `std::cell::Cell::::set` (at RUSTLIB/core/src/cell.rs:LL:CC) +note: which got called inside `safe` --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | y.set(1); | ^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC | LL | safe_raw(xshr, xraw as *mut _); diff --git a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr index 009ec2dd4aaac..c9341ccdb0371 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr @@ -16,14 +16,17 @@ help: was later invalidated at offsets [0x0..0x4] by a write access | LL | *our = 5; | ^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC -note: inside `demo_box_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_box_advanced_unique` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); diff --git a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr index d4cfab024bae1..446d283694a12 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr @@ -18,14 +18,17 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC -note: inside `demo_box_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_box_advanced_unique` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC | LL | demo_box_advanced_unique(Box::new(0)); diff --git a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr index cc6633eb24f94..1a5662b746937 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `test` at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC -note: inside `main` +note: error occurred inside `test` + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + | +LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); diff --git a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr index 6a1f7761a4108..6ec056828fd53 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr @@ -25,9 +25,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | *x = 5; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `test` at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC -note: inside `main` +note: error occurred inside `test` + --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + | +LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC | LL | test(Box::from_raw(ptr), ptr); diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr index c4cb2c7ae4d65..2b0d5f07994c4 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr @@ -22,9 +22,12 @@ help: was later invalidated at offsets [0x0..0x10] by a Unique retag | LL | from_raw_parts_mut(ptr.offset(mid as isize), len - mid), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `safe::split_at_mut::` at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC -note: inside `main` +note: error occurred inside `safe::split_at_mut::` + --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC + | +LL | pub fn split_at_mut(self_: &mut [T], mid: usize) -> (&mut [T], &mut [T]) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC | LL | let (a, b) = safe::split_at_mut(&mut array, 0); diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr index 40b44d77e3df5..3c09bec03d6a7 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { | ^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/illegal_write6.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC + | +LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | foo(x, p); diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr index 1547a6ca73a04..69bb914236dab 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr @@ -25,9 +25,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | *a = 1; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/illegal_write6.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/illegal_write6.rs:LL:CC + | +LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/illegal_write6.rs:LL:CC | LL | foo(x, p); diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr index ef531be496afd..d298d511d3e1a 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr index 90a89e48e61bf..b83217bce7e9e 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr @@ -19,9 +19,12 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC | LL | inner(xraw, xref); diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr index caf2b702fec60..ebbc3a7ae8c0e 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr index 8bac71dcd4682..1a1eb89d25f70 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr @@ -19,9 +19,12 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC | LL | inner(ptr, &*ptr); diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr index 9927d90c6469a..2b2e16d1ecff4 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr @@ -11,10 +11,13 @@ help: ALLOC was allocated here: | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr index 9927d90c6469a..2b2e16d1ecff4 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr @@ -11,10 +11,13 @@ help: ALLOC was allocated here: | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC | LL | drop(Box::from_raw(ptr as *mut u32)); diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr index c704085f95832..f33b6cf77e4d3 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr @@ -6,10 +6,9 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` + = note: this is inside `std::boxed::Box::::from_raw_in` + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr index c704085f95832..f33b6cf77e4d3 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr @@ -6,10 +6,9 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `main` + = note: this is inside `std::boxed::Box::::from_raw_in` + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `main` --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC | LL | drop(Box::from_raw(ptr.as_ptr())); diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr index 3c8316ca5bc18..290f50f60c2b5 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr @@ -16,14 +16,17 @@ help: was later invalidated at offsets [0x0..0x4] by a write access | LL | *our = 5; | ^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC -note: inside `demo_mut_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_mut_advanced_unique` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr index f5c1dea69f02b..608e41341c3f2 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr @@ -18,14 +18,17 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `unknown_code_2` at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC -note: inside `demo_mut_advanced_unique` +note: error occurred inside `unknown_code_2` + --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + | +LL | fn unknown_code_2() { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `demo_mut_advanced_unique` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | unknown_code_2(); | ^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC | LL | demo_mut_advanced_unique(&mut 0); diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr index 7cee5fb1369d1..68fd20ba942a9 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr @@ -16,20 +16,23 @@ help: is this argument | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside closure +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr index aa07ef53b315b..f0dffb8f14adf 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr @@ -25,21 +25,24 @@ help: the protected tag later transitioned to Reserved (conflicted) due to LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr index 7bd42fc20ce7a..8f1619bda4034 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr @@ -16,20 +16,23 @@ help: is this argument | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `std::boxed::Box::::from_raw_in` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::boxed::Box::::from_raw` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside closure +note: error occurred inside `std::boxed::Box::::from_raw_in` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr index c8a72c5917620..f7a2d63dc8a93 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr @@ -25,21 +25,24 @@ help: the protected tag later transitioned to Reserved (conflicted) due to LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` +note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | dealloc(); | ^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC | LL | / dealloc_while_running( diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr index d97850d7a4449..8624205444bce 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -14,9 +14,12 @@ LL | let _r = &mut *p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `thread_2` + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | fn thread_2(p: SendPtr) { + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr index c1b37f8a9bfc4..6d1dff0d5f533 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -14,9 +14,12 @@ LL | let _r = &mut *p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `thread_2` + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | fn thread_2(p: SendPtr) { + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr index 7c4fe74870121..ff99688028098 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> &i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr index a8e3553aae2c2..598a95dd96c9b 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> &i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr index 8411437ea4c97..d337823011804 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> Option<&i32> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr index 39da45ad6db4d..d303cc9b22e87 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> Option<&i32> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr index a7c422aa73f2c..d6063168d33d4 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> (&i32,) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr index 66b03e57905e9..0c5b05ce1b94a 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> (&i32,) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr index eed8c0273ab12..3a05fb151cf19 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr @@ -11,14 +11,17 @@ help: was created by a SharedReadOnly retag at offsets [0x0..0x4] | LL | *(x as *const i32 as *mut i32) = 7; | ^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code` at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC -note: inside `foo` +note: error occurred inside `unknown_code` + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + | +LL | fn unknown_code(x: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `foo` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr index d9b75f65f752e..8040cfa212a90 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr @@ -12,14 +12,17 @@ help: the accessed tag was created here, in the initial state Frozen | LL | fn unknown_code(x: &i32) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `unknown_code` at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC -note: inside `foo` +note: error occurred inside `unknown_code` + --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + | +LL | fn unknown_code(x: &i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `foo` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | unknown_code(&*x); | ^^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC | LL | println!("{}", foo(&mut 0)); diff --git a/src/tools/miri/tests/fail/box-cell-alias.stderr b/src/tools/miri/tests/fail/box-cell-alias.stderr index 8e1e9370c7074..c5ce263ff1c96 100644 --- a/src/tools/miri/tests/fail/box-cell-alias.stderr +++ b/src/tools/miri/tests/fail/box-cell-alias.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x1] by a Unique retag | LL | let res = helper(val, ptr); | ^^^ - = note: BACKTRACE (of the first span): - = note: inside `helper` at tests/fail/box-cell-alias.rs:LL:CC -note: inside `main` +note: error occurred inside `helper` + --> tests/fail/box-cell-alias.rs:LL:CC + | +LL | fn helper(val: Box>, ptr: *const Cell) -> u8 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/box-cell-alias.rs:LL:CC | LL | let res = helper(val, ptr); diff --git a/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr b/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr index 995a5e3eac146..f0f145fd13662 100644 --- a/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr +++ b/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr @@ -6,9 +6,8 @@ LL | match r { | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside closure at tests/fail/closures/uninhabited-variant.rs:LL:CC -note: inside `main` + = note: this is inside closure +note: which got called inside `main` --> tests/fail/closures/uninhabited-variant.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs index 9c73f6c03edd4..5afa6c71700ed 100644 --- a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs +++ b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs @@ -4,7 +4,7 @@ //@normalize-stderr-test: "\| +\^+" -> "| ^" //@normalize-stderr-test: "\n *= note:.*" -> "" // On macOS we use chekced pthread mutexes which changes the error -//@normalize-stderr-test: "this thread got stuck here" -> "thread `main` got stuck here" +//@normalize-stderr-test: "a thread got stuck here" -> "thread `main` got stuck here" //@normalize-stderr-test: "a thread deadlocked" -> "the evaluated program deadlocked" use std::mem; use std::sync::Mutex; diff --git a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr index 7784132a54ce8..258f5a823fcd8 100644 --- a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr +++ b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr @@ -2,9 +2,9 @@ error: the evaluated program deadlocked --> RUSTLIB/std/$FILE:LL:CC | LL | $CODE - | ^ thread `main` got stuck here + | ^ thread got stuck here | -note: inside `main` +note: which got called inside `main` --> tests/fail/concurrency/mutex-leak-move-deadlock.rs:LL:CC | LL | $CODE diff --git a/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr index 70ecfa9379a7d..2cc3b845deba4 100644 --- a/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr +++ b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr @@ -16,15 +16,18 @@ help: ALLOC was deallocated here: | LL | }; // *deallocate* coroutine_iterator | ^ - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/coroutine-pinned-moved.rs:LL:CC -note: inside ` as std::iter::Iterator>::next` +note: error occurred inside closure + --> tests/fail/coroutine-pinned-moved.rs:LL:CC + | +LL | static move || { + | ^^^^^^^^^^^^^^ +note: which got called inside ` as std::iter::Iterator>::next` --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | match me.resume(()) { | ^^^^^^^^^^^^^ - = note: inside `std::boxed::iter::>>::next` at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC -note: inside `main` + = note: which got called inside `std::boxed::iter::>>::next` (at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC) +note: which got called inside `main` --> tests/fail/coroutine-pinned-moved.rs:LL:CC | LL | coroutine_iterator_2.next(); // and use moved value diff --git a/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr b/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr index df2b227c80978..e5471e094bc89 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr @@ -6,9 +6,8 @@ LL | unsafe { &(*x).0 as *const i32 } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `via_ref` at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC -note: inside `main` + = note: this is inside `via_ref` +note: which got called inside `main` --> tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC | LL | via_ref(ptr); // this is not diff --git a/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr b/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr index 3a3133049b21d..93bb9603ae5b8 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr @@ -6,9 +6,8 @@ LL | let _ref = unsafe { &mut *(LEAK as *mut i32) }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `evil` at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC -note: inside `main` + = note: this is inside `evil` +note: which got called inside `main` --> tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC | LL | evil(); diff --git a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr index d4933db2ed575..c9e9059ef0853 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr index da7f5ed869db1..110c013ec0cc6 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr @@ -11,6 +11,7 @@ LL | .store(Box::into_raw(Box::::new_uninit()) as *mut us | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr index 203e6a10e4977..2d0317c7ffdff 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr index 791dc71f99301..a5c1006e31f6e 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr index 73d963875fb10..bef2f1f6fa1a8 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr index 066fff5e3d360..56c6695491061 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr index 10b7d8398d9d9..3b79801bfab8c 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr index bb854bc4235c8..069dc9ac8de81 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr index 8cecfbee9d956..a01f85ab6ce13 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr @@ -11,6 +11,7 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr index 7260776043eae..67b254c265dae 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_race.stderr @@ -11,6 +11,7 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr index c4200ea96153d..afe1125e7514c 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr @@ -16,6 +16,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr index 5ab5c9655d78a..a741203dcf6d5 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr @@ -20,6 +20,7 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ) | |_____________^ + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr index b52e48827b4b6..4adf3f3d58d3b 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr index 0a574068d4e7b..cfa4f06f9a9fe 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr @@ -16,6 +16,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr index 9fbae21eb8912..3a843a4eba5d9 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr @@ -20,6 +20,7 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ); | |_____________^ + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr index 0c853ccb8cc1f..708fddb8f0be0 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr index a8eee1241b65e..adcf00c8a88ff 100644 --- a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr @@ -11,6 +11,7 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/fence_after_load.stderr b/src/tools/miri/tests/fail/data_race/fence_after_load.stderr index bf2ac30a1e3f4..f2098e1d3e2d6 100644 --- a/src/tools/miri/tests/fail/data_race/fence_after_load.stderr +++ b/src/tools/miri/tests/fail/data_race/fence_after_load.stderr @@ -11,6 +11,7 @@ LL | unsafe { V = 1 } | ^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr index 52bd7721ef22a..676a62b8fefe6 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr @@ -11,6 +11,7 @@ LL | StorageLive(val); | ^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr index 969b6faadbe1c..269676caf5c71 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr @@ -11,6 +11,7 @@ LL | let _val = val; | ^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr index 0bf7dd28c0f95..5e26e88ce98c9 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr @@ -11,6 +11,7 @@ LL | let mut val: u8 = 0; | ^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr index 087f326053b52..95b41a232b2cc 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr @@ -13,6 +13,7 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr index 66aee703e4f3a..96b0c00e08cc8 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr @@ -13,6 +13,7 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr index 967fd45c5b36c..e795f7ec81202 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr @@ -13,6 +13,7 @@ LL | a8[0].load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr index 7664c3f13e3d8..ecdbb49e8b869 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr @@ -13,6 +13,7 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr index f1884bf404f15..be1bb4e507f65 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr @@ -19,6 +19,7 @@ LL | | ); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr index 7e30cf6856de7..0b1eac5d5d032 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr @@ -13,6 +13,7 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr index 74bb72b986af0..da62f537903af 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr @@ -13,6 +13,7 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/read_write_race.stderr b/src/tools/miri/tests/fail/data_race/read_write_race.stderr index ce063d8c532f3..9163bff917e4f 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr index 5ac78a2ecf6b0..719a7162690a3 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr index fffde0370a2aa..ea441ab36722a 100644 --- a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr +++ b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr index 61f5501434b81..8cb1fd7ce6136 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr index 2c28ee03e786b..d9a4b71ca21fb 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/rmw_race.stderr b/src/tools/miri/tests/fail/data_race/rmw_race.stderr index 04621ff07b81b..c1eeef1dca766 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/tests/fail/data_race/rmw_race.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr b/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr index 130a31ebeef09..c543bcf111509 100644 --- a/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr +++ b/src/tools/miri/tests/fail/data_race/stack_pop_race.stderr @@ -11,6 +11,7 @@ LL | let _val = unsafe { *ptr.0 }; | ^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/write_write_race.stderr b/src/tools/miri/tests/fail/data_race/write_write_race.stderr index 03bee0060a4e1..13f798e4da569 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race.stderr @@ -11,6 +11,7 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr index cb2faf4ac2742..eb8c2747b40e9 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr @@ -11,6 +11,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: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr b/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr index f3ec20837d374..068d4b4f13292 100644 --- a/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr +++ b/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr @@ -6,9 +6,8 @@ LL | SetDiscriminant(*ptr, 1); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `set_discriminant` at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC -note: inside `main` + = note: this is inside `set_discriminant` +note: which got called inside `main` --> tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC | LL | set_discriminant(&mut v); diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr index 8a454bedb281b..f45f5c26bacbd 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr @@ -21,9 +21,12 @@ help: is this argument | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `callee` at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC -note: inside `main` +note: error occurred inside `callee` + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + | +LL | fn callee(x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr index 74706d6b9f6bc..044026ee8ddc5 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `callee` at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC -note: inside `main` +note: error occurred inside `callee` + --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + | +LL | fn callee(x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC | LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr index 09a5b9a649619..b66d13cede1f4 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr @@ -6,9 +6,8 @@ LL | unsafe { ptr.read() }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC -note: inside `main` + = note: this is inside `change_arg` +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr index 609599ef6ca8d..9dc9adc13ae32 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr @@ -21,9 +21,12 @@ help: is this argument | LL | x.0 = 0; | ^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC -note: inside `main` +note: error occurred inside `change_arg` + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + | +LL | fn change_arg(mut x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr index c8c0e5c37efed..0a6c6e615a163 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | x.0 = 0; | ^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `change_arg` at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC -note: inside `main` +note: error occurred inside `change_arg` + --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + | +LL | fn change_arg(mut x: S, ptr: *mut S) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC | LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index 95f79aae6c177..dd7f52d03f20f 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -14,21 +14,20 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `nounwind` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `nounwind` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | / extern "C-unwind" fn nounwind() { LL | | panic!(); LL | | } | |_^ -note: inside `main` +note: which got called inside `main` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index 95f79aae6c177..dd7f52d03f20f 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -14,21 +14,20 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `nounwind` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `nounwind` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | / extern "C-unwind" fn nounwind() { LL | | panic!(); LL | | } | |_^ -note: inside `main` +note: which got called inside `main` --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC | LL | unsafe { nounwind() } diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr index d478568ceaeb5..32e80ed0e61ed 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr @@ -6,9 +6,8 @@ LL | unsafe { ptr.read() }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC -note: inside `main` + = note: this is inside `myfun` +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr index 86adbab353b48..14c8e5cb89606 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr @@ -21,9 +21,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr index b43e19c3905c0..2e5b687f90ac8 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr index faae6172d7510..63dee06563d1d 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr @@ -21,9 +21,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr index deefb24b7850d..80c111d4ddb4e 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `myfun` at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun` + --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + | +LL | fn myfun(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr index 1a18857bb1755..a6129451530ac 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr @@ -21,9 +21,12 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | become myfun2(ptr) | ^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `myfun2` at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun2` + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + | +LL | fn myfun2(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr index 76ccf39744d9b..a6fff1c266831 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr @@ -30,9 +30,12 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference - = note: BACKTRACE (of the first span): - = note: inside `myfun2` at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC -note: inside `main` +note: error occurred inside `myfun2` + --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + | +LL | fn myfun2(ptr: *mut i32) -> i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC | LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) diff --git a/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr b/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr index 755bc3e7c2c03..ef6decaece355 100644 --- a/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr +++ b/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr @@ -6,9 +6,8 @@ LL | unsafe { foo(0.0, x) } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `bar` at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC -note: inside `main` + = note: this is inside `bar` +note: which got called inside `main` --> tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC | LL | let copy = bar(input); diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr index 1e7f500edb2dd..697e35a660caa 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr @@ -6,9 +6,8 @@ LL | RET = PtrMetadata(*p); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC -note: inside `main` + = note: this is inside `deref_meta` +note: which got called inside `main` --> tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr().cast()); diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr index d284a6f6d0193..ba711710b41eb 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr @@ -18,9 +18,8 @@ LL | RET = PtrMetadata(*p); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC -note: inside `main` + = note: this is inside `deref_meta` +note: which got called inside `main` --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr().cast()); diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr index 7a1f3d6ea84f6..104e281f2a8e5 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr @@ -6,9 +6,8 @@ LL | RET = PtrMetadata(*p); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `deref_meta` at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC -note: inside `main` + = note: this is inside `deref_meta` +note: which got called inside `main` --> tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC | LL | let _meta = deref_meta(p.as_ptr()); diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr index 7db7958299257..619925f28968f 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr @@ -6,9 +6,8 @@ LL | typed_swap_nonoverlapping(a, b); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `invalid_array` at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC -note: inside `main` + = note: this is inside `invalid_array` +note: which got called inside `main` --> tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC | LL | invalid_array(); diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr index 7edf72205d9ee..42bea7dd5e34b 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr @@ -6,9 +6,8 @@ LL | typed_swap_nonoverlapping(a, b); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `invalid_scalar` at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC -note: inside `main` + = note: this is inside `invalid_scalar` +note: which got called inside `main` --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC | LL | invalid_scalar(); diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr index aece0b6cb98a4..13e8c7f9c5aef 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr @@ -6,9 +6,8 @@ LL | typed_swap_nonoverlapping(a, b); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `invalid_scalar` at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC -note: inside `main` + = note: this is inside `invalid_scalar` +note: which got called inside `main` --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC | LL | invalid_scalar(); diff --git a/src/tools/miri/tests/fail/issue-miri-1112.stderr b/src/tools/miri/tests/fail/issue-miri-1112.stderr index 98f04ff1af65b..0fc67c6d4fd9f 100644 --- a/src/tools/miri/tests/fail/issue-miri-1112.stderr +++ b/src/tools/miri/tests/fail/issue-miri-1112.stderr @@ -6,9 +6,8 @@ LL | let obj = std::mem::transmute::(obj) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `FunnyPointer::from_data_ptr` at tests/fail/issue-miri-1112.rs:LL:CC -note: inside `main` + = note: this is inside `FunnyPointer::from_data_ptr` +note: which got called inside `main` --> tests/fail/issue-miri-1112.rs:LL:CC | LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _); diff --git a/src/tools/miri/tests/fail/memleak_rc.stderr b/src/tools/miri/tests/fail/memleak_rc.stderr index df12eeed6ac64..f7b0950ef6ced 100644 --- a/src/tools/miri/tests/fail/memleak_rc.stderr +++ b/src/tools/miri/tests/fail/memleak_rc.stderr @@ -4,9 +4,8 @@ error: memory leaked: ALLOC (Rust heap, SIZE, ALIGN), allocated here: LL | Box::leak(Box::new(RcInner { strong: Cell::new(1), weak: Cell::new(1), value })) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: BACKTRACE: - = note: inside `std::rc::Rc::>>::new` at RUSTLIB/alloc/src/rc.rs:LL:CC -note: inside `main` + = note: this is inside `std::rc::Rc::>>::new` +note: which got called inside `main` --> tests/fail/memleak_rc.rs:LL:CC | LL | let x = Dummy(Rc::new(RefCell::new(None))); diff --git a/src/tools/miri/tests/fail/never_transmute_void.stderr b/src/tools/miri/tests/fail/never_transmute_void.stderr index 10ef783f22014..a236d17c49dd3 100644 --- a/src/tools/miri/tests/fail/never_transmute_void.stderr +++ b/src/tools/miri/tests/fail/never_transmute_void.stderr @@ -6,9 +6,8 @@ LL | match v.0 {} | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `m::f` at tests/fail/never_transmute_void.rs:LL:CC -note: inside `main` + = note: this is inside `m::f` +note: which got called inside `main` --> tests/fail/never_transmute_void.rs:LL:CC | LL | m::f(v); diff --git a/src/tools/miri/tests/fail/overlapping_assignment.stderr b/src/tools/miri/tests/fail/overlapping_assignment.stderr index a479e8be64819..6bf7fa4465980 100644 --- a/src/tools/miri/tests/fail/overlapping_assignment.stderr +++ b/src/tools/miri/tests/fail/overlapping_assignment.stderr @@ -6,9 +6,8 @@ LL | *ptr1 = *ptr2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `self_copy` at tests/fail/overlapping_assignment.rs:LL:CC -note: inside `main` + = note: this is inside `self_copy` +note: which got called inside `main` --> tests/fail/overlapping_assignment.rs:LL:CC | LL | self_copy(ptr, ptr); diff --git a/src/tools/miri/tests/fail/panic/abort_unwind.stderr b/src/tools/miri/tests/fail/panic/abort_unwind.stderr index 23dbc2fb8f392..1f45211c5ee40 100644 --- a/src/tools/miri/tests/fail/panic/abort_unwind.stderr +++ b/src/tools/miri/tests/fail/panic/abort_unwind.stderr @@ -14,15 +14,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `std::panic::abort_unwind::<{closure@tests/fail/panic/abort_unwind.rs:LL:CC}, ()>` at RUSTLIB/core/src/panic.rs:LL:CC -note: inside `main` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::abort_unwind::<{closure@tests/fail/panic/abort_unwind.rs:LL:CC}, ()>` (at RUSTLIB/core/src/panic.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/abort_unwind.rs:LL:CC | LL | std::panic::abort_unwind(|| panic!("PANIC!!!")); diff --git a/src/tools/miri/tests/fail/panic/bad_unwind.stderr b/src/tools/miri/tests/fail/panic/bad_unwind.stderr index b0a8492b6a617..06e019bb6978b 100644 --- a/src/tools/miri/tests/fail/panic/bad_unwind.stderr +++ b/src/tools/miri/tests/fail/panic/bad_unwind.stderr @@ -11,12 +11,11 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside closure at tests/fail/panic/bad_unwind.rs:LL:CC - = note: inside `std::panicking::catch_unwind::do_call::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::catch_unwind::<(), {closure@tests/fail/panic/bad_unwind.rs:LL:CC}>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` at RUSTLIB/std/src/panic.rs:LL:CC -note: inside `main` + = note: this is inside closure + = note: which got called inside `std::panicking::catch_unwind::do_call::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::<(), {closure@tests/fail/panic/bad_unwind.rs:LL:CC}>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::catch_unwind::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` (at RUSTLIB/std/src/panic.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/bad_unwind.rs:LL:CC | LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); diff --git a/src/tools/miri/tests/fail/panic/double_panic.stderr b/src/tools/miri/tests/fail/panic/double_panic.stderr index edbc0d8fc571b..4beadb6aa647b 100644 --- a/src/tools/miri/tests/fail/panic/double_panic.stderr +++ b/src/tools/miri/tests/fail/panic/double_panic.stderr @@ -17,14 +17,13 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind_nobacktrace` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_in_cleanup` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind_nobacktrace` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_in_cleanup` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/double_panic.rs:LL:CC | LL | / fn main() { diff --git a/src/tools/miri/tests/fail/panic/no_std.stderr b/src/tools/miri/tests/fail/panic/no_std.stderr index dbd29e43069ef..128dfddc215e1 100644 --- a/src/tools/miri/tests/fail/panic/no_std.stderr +++ b/src/tools/miri/tests/fail/panic/no_std.stderr @@ -6,9 +6,8 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `panic_handler` at tests/fail/panic/no_std.rs:LL:CC -note: inside `miri_start` + = note: this is inside `panic_handler` +note: which got called inside `miri_start` --> tests/fail/panic/no_std.rs:LL:CC | LL | panic!("blarg I am dead") diff --git a/src/tools/miri/tests/fail/panic/panic_abort1.stderr b/src/tools/miri/tests/fail/panic/panic_abort1.stderr index c389a9bc0750b..57c8ee843b862 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort1.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort1.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort1.rs:LL:CC | LL | std::panic!("panicking from libstd"); diff --git a/src/tools/miri/tests/fail/panic/panic_abort2.stderr b/src/tools/miri/tests/fail/panic/panic_abort2.stderr index 5fe2245cbe009..7c145634a1026 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort2.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort2.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort2.rs:LL:CC | LL | std::panic!("{}-panicking from libstd", 42); diff --git a/src/tools/miri/tests/fail/panic/panic_abort3.stderr b/src/tools/miri/tests/fail/panic/panic_abort3.stderr index cac24ca41c715..71877122b6254 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort3.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort3.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort3.rs:LL:CC | LL | core::panic!("panicking from libcore"); diff --git a/src/tools/miri/tests/fail/panic/panic_abort4.stderr b/src/tools/miri/tests/fail/panic/panic_abort4.stderr index 21195729ae82b..2b4c6bea5605f 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort4.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort4.stderr @@ -9,15 +9,14 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::rt::__rust_abort` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `panic_abort::__rust_start_panic` at RUSTLIB/panic_abort/src/lib.rs:LL:CC - = note: inside `std::panicking::rust_panic` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::rt::__rust_abort` + = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) + = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/panic/panic_abort4.rs:LL:CC | LL | core::panic!("{}-panicking from libcore", 42); diff --git a/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr b/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr index 013c39a22462d..6af86ffdb2bd0 100644 --- a/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr +++ b/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr @@ -6,9 +6,8 @@ LL | let _val = *left_ptr; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `deref` at tests/fail/provenance/provenance_transmute.rs:LL:CC -note: inside `main` + = note: this is inside `deref` +note: which got called inside `main` --> tests/fail/provenance/provenance_transmute.rs:LL:CC | LL | deref(ptr1, ptr2.with_addr(ptr1.addr())); diff --git a/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr b/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr index c5f6e62b86906..7fc54636b5524 100644 --- a/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr +++ b/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr @@ -12,12 +12,11 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC -note: inside `main` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) +note: which got called inside `main` --> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC | LL | std::ptr::swap_nonoverlapping(ptr, ptr, 1); diff --git a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr index f08909d442767..eb7f70a351ad9 100644 --- a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr +++ b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr @@ -6,19 +6,18 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a | = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning - = note: BACKTRACE: - = note: inside closure at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::cvt_r::` at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC - = note: inside `std::sys::fs::PLATFORM::File::open_c` at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::` at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC - = note: inside `std::sys::fs::PLATFORM::File::open` at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC - = note: inside `std::fs::OpenOptions::_open` at RUSTLIB/std/src/fs.rs:LL:CC - = note: inside `std::fs::OpenOptions::open::<&std::path::Path>` at RUSTLIB/std/src/fs.rs:LL:CC - = note: inside `std::fs::File::open::<&str>` at RUSTLIB/std/src/fs.rs:LL:CC -note: inside `main` + = note: this is inside closure + = note: which got called inside `std::sys::pal::PLATFORM::cvt_r::` (at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC) + = note: which got called inside `std::sys::fs::PLATFORM::File::open_c` (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) + = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) + = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) + = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) + = note: which got called inside `std::sys::fs::PLATFORM::File::open` (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) + = note: which got called inside `std::fs::OpenOptions::_open` (at RUSTLIB/std/src/fs.rs:LL:CC) + = note: which got called inside `std::fs::OpenOptions::open::<&std::path::Path>` (at RUSTLIB/std/src/fs.rs:LL:CC) + = note: which got called inside `std::fs::File::open::<&str>` (at RUSTLIB/std/src/fs.rs:LL:CC) +note: which got called inside `main` --> tests/fail/shims/fs/isolated_file.rs:LL:CC | LL | let _file = std::fs::File::open("file.txt").unwrap(); diff --git a/src/tools/miri/tests/fail/shims/isolated_stdin.stderr b/src/tools/miri/tests/fail/shims/isolated_stdin.stderr index 5fda90b46ef6f..58f0957a668cc 100644 --- a/src/tools/miri/tests/fail/shims/isolated_stdin.stderr +++ b/src/tools/miri/tests/fail/shims/isolated_stdin.stderr @@ -5,7 +5,7 @@ error: unsupported operation: `read` from stdin not available when isolation is | = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning -note: inside `main` +note: which got called inside `main` --> tests/fail/shims/isolated_stdin.rs:LL:CC | | ^ diff --git a/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr b/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr index 8d18e5a7d6053..84051e688aabd 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr @@ -6,22 +6,21 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information - = note: BACKTRACE: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure + = note: this is inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` + = note: which got called inside `<{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) +note: which got called inside `inner` --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | f(x) | ^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |x| { diff --git a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr index 464c44802ec30..7f4899bb0d6f8 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr @@ -16,11 +16,14 @@ help: is this argument | LL | core::ptr::drop_in_place(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `::drop` at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC - = note: inside `std::ptr::drop_in_place:: - shim(Some(HasDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` +note: error occurred inside `::drop` + --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place:: - shim(Some(HasDrop))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) +note: which got called inside `main` --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC | LL | core::ptr::drop_in_place(x); diff --git a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr index e586d3f03994f..11b3e49b852e6 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr @@ -13,9 +13,14 @@ help: was created by a SharedReadOnly retag at offsets [0x0..0x1] | LL | let x = core::ptr::addr_of!(x); | ^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `std::ptr::drop_in_place:: - shim(None)` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` +note: error occurred inside `std::ptr::drop_in_place:: - shim(None)` + --> RUSTLIB/core/src/ptr/mod.rs:LL:CC + | +LL | / pub const unsafe fn drop_in_place(to_drop: *mut T) +LL | | where +LL | | T: [const] Destruct, + | |________________________^ +note: which got called inside `main` --> tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC | LL | core::ptr::drop_in_place(x.cast_mut()); diff --git a/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr b/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr index b082abe7b25b4..17abcf0a46433 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr @@ -16,9 +16,12 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &mut i32) { | ^^ - = note: BACKTRACE (of the first span): - = note: inside `inner` at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC -note: inside `main` +note: error occurred inside `inner` + --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC + | +LL | fn inner(x: *mut i32, _y: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC | LL | inner(xraw, xref); diff --git a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr index b07599a500ee0..a13ff30deda7a 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x1] by a write access | LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created. | ^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `fun2` at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC -note: inside `main` +note: error occurred inside `fun2` + --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC + | +LL | fn fun2() { + | ^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC | LL | fun2(); // if they now use a raw ptr they break our reference diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr index 5b8f77600cd29..c8662628c033e 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr @@ -14,6 +14,7 @@ LL | unsafe { ptr.0.read() }; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr index ee82bbbb1ed14..3a95e13f5bc01 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -14,9 +14,12 @@ LL | let _r = &*p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `thread_2` at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `thread_2` + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC + | +LL | fn thread_2(p: SendPtr) { + | ^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr index 4ac82192a9fbb..9148f5ae817cf 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr @@ -16,9 +16,12 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> &mut i32 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC | LL | foo(&mut (1, 2)); diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr index 7e7670e49f17c..6cce7f9f246ee 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> Option<&mut i32> { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC | LL | match foo(&mut (1, 2)) { diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr index aeaa694d29233..37d18f122b688 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr @@ -19,9 +19,12 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC + | +LL | fn foo(x: &mut (i32, i32)) -> (&mut i32,) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC | LL | foo(&mut (1, 2)).0; diff --git a/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr b/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr index 61a57a64116b3..00dd2999f540a 100644 --- a/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr +++ b/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr @@ -6,20 +6,19 @@ LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `>::call_once - shim(fn())` at RUSTLIB/core/src/ops/function.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_begin_short_backtrace::` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::ops::function::impls:: for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once` at RUSTLIB/core/src/ops/function.rs:LL:CC - = note: inside `std::panicking::catch_unwind::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::catch_unwind:: i32 + std::marker::Sync + std::panic::RefUnwindSafe>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` at RUSTLIB/std/src/panic.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::panicking::catch_unwind::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panicking::catch_unwind::` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` at RUSTLIB/std/src/panic.rs:LL:CC - = note: inside `std::rt::lang_start_internal` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::rt::lang_start::<()>` at RUSTLIB/std/src/rt.rs:LL:CC + = note: this is inside `>::call_once - shim(fn())` + = note: which got called inside `std::sys::backtrace::__rust_begin_short_backtrace::` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: which got called inside `std::ops::function::impls:: for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once` (at RUSTLIB/core/src/ops/function.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind:: i32 + std::marker::Sync + std::panic::RefUnwindSafe>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` (at RUSTLIB/std/src/panic.rs:LL:CC) + = note: which got called inside closure (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panicking::catch_unwind::` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` (at RUSTLIB/std/src/panic.rs:LL:CC) + = note: which got called inside `std::rt::lang_start_internal` (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: which got called inside `std::rt::lang_start::<()>` (at RUSTLIB/std/src/rt.rs:LL:CC) error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr index 965dd5b399f75..a48673fb4b23a 100644 --- a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr +++ b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr @@ -16,9 +16,12 @@ help: ALLOC was deallocated here: | LL | f(std::ptr::null()); | ^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `g` at tests/fail/tail_calls/dangling-local-var.rs:LL:CC -note: inside `main` +note: error occurred inside `g` + --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC + | +LL | fn g(x: *const i32) { + | ^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC | LL | f(std::ptr::null()); diff --git a/src/tools/miri/tests/fail/terminate-terminator.stderr b/src/tools/miri/tests/fail/terminate-terminator.stderr index 8ae649a392bda..7d8ae128b5d66 100644 --- a/src/tools/miri/tests/fail/terminate-terminator.stderr +++ b/src/tools/miri/tests/fail/terminate-terminator.stderr @@ -16,14 +16,13 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `has_cleanup` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `has_cleanup` --> tests/fail/terminate-terminator.rs:LL:CC | LL | / fn has_cleanup() { @@ -31,12 +30,12 @@ LL | | let _f = Foo; LL | | panic!(); LL | | } | |_^ -note: inside `panic_abort` +note: which got called inside `panic_abort` --> tests/fail/terminate-terminator.rs:LL:CC | LL | has_cleanup(); | ^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/terminate-terminator.rs:LL:CC | LL | panic_abort(); diff --git a/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr b/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr index db113b6cf457c..efc4bead418ee 100644 --- a/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr +++ b/src/tools/miri/tests/fail/tls/tls_static_dealloc.stderr @@ -6,6 +6,7 @@ LL | let _val = *dangling_ptr.0; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tls_macro_leak.stderr b/src/tools/miri/tests/fail/tls_macro_leak.stderr index 512932b3cb8a6..c3029bb5b4dec 100644 --- a/src/tools/miri/tests/fail/tls_macro_leak.stderr +++ b/src/tools/miri/tests/fail/tls_macro_leak.stderr @@ -4,11 +4,10 @@ error: memory leaked: ALLOC (Rust heap, size: 4, align: 4), allocated here: LL | cell.set(Some(Box::leak(Box::new(123)))); | ^^^^^^^^^^^^^ | - = note: BACKTRACE: - = note: inside closure at tests/fail/tls_macro_leak.rs:LL:CC - = note: inside `std::thread::LocalKey::>>::try_with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC - = note: inside `std::thread::LocalKey::>>::with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` at RUSTLIB/std/src/thread/local.rs:LL:CC -note: inside closure + = note: this is inside closure + = note: which got called inside `std::thread::LocalKey::>>::try_with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` (at RUSTLIB/std/src/thread/local.rs:LL:CC) + = note: which got called inside `std::thread::LocalKey::>>::with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` (at RUSTLIB/std/src/thread/local.rs:LL:CC) +note: which got called inside closure --> tests/fail/tls_macro_leak.rs:LL:CC | LL | / TLS.with(|cell| { diff --git a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr index 7960f42faa519..e504f8dde717e 100644 --- a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr @@ -19,9 +19,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `stuff` at tests/fail/tree_borrows/outside-range.rs:LL:CC -note: inside `main` +note: error occurred inside `stuff` + --> tests/fail/tree_borrows/outside-range.rs:LL:CC + | +LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/outside-range.rs:LL:CC | LL | stuff(&mut *raw, raw); diff --git a/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr b/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr index 9a70d248aa0c3..48527fedcc35f 100644 --- a/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr @@ -30,9 +30,12 @@ help: the conflicting tag later transitioned to Frozen due to a foreign re LL | let _val = unsafe { *xraw }; // invalidate xref for writing | ^^^^^ = help: this transition corresponds to a loss of write permissions - = note: BACKTRACE (of the first span): - = note: inside `foo` at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC -note: inside `main` +note: error occurred inside `foo` + --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC + | +LL | fn foo(nope: &mut i32) { + | ^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC | LL | foo(xref); diff --git a/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr b/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr index 012d7caef501a..40a3989c2dc4b 100644 --- a/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | do_something(*orig_ptr); | ^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span): - = note: inside `access_after_sub_1` at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC -note: inside `main` +note: error occurred inside `access_after_sub_1` + --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC + | +LL | unsafe fn access_after_sub_1(x: &mut u8, orig_ptr: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC | LL | access_after_sub_1(&mut *(foo as *mut u8).byte_add(1), orig_ptr); diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index b1c3ffe86ef7f..8effbe30dd6ae 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -29,9 +29,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `main::write_second` at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC -note: inside `main` +note: error occurred inside `main::write_second` + --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC + | +LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC | LL | write_second(x, y); diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr index 5f3129b9dc089..1bc337eb1e7a5 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -29,9 +29,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { | ^ - = note: BACKTRACE (of the first span): - = note: inside `main::write_second` at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC -note: inside `main` +note: error occurred inside `main::write_second` + --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC + | +LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC | LL | write_second(x, y); diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index 15365e5c8bcc5..c5a0b58c21853 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -32,6 +32,7 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *x = 64; | ^^^^^^^ = help: this transition corresponds to a loss of read and write permissions + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index 4065c822866c6..75c11f09ce522 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -32,6 +32,7 @@ help: the accessed tag later transitioned to Disabled due to a protector r LL | } | ^ = help: this transition corresponds to a loss of read and write permissions + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr index 8f2534d6b6e97..eef8766fd652e 100644 --- a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr @@ -31,9 +31,12 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | } | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` at tests/fail/tree_borrows/spurious_read.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC + | +LL | fn as_mut(y: &mut u8, b: (usize, Arc)) -> *mut u8 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); diff --git a/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr index 685abee3292f6..9545ebf39a27a 100644 --- a/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr @@ -18,22 +18,25 @@ help: the strongly protected tag was created here, in the initial state Re | LL | fn inner(x: &mut i32, f: fn(*mut i32)) { | ^ - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` + = note: which got called inside `<{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) +note: which got called inside `inner` --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | f(x) | ^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |raw| { diff --git a/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr b/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr index b98d2fafcf4ee..3db6dab3167b2 100644 --- a/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr @@ -18,9 +18,12 @@ help: the conflicting tag was created here, in the initial state Frozen | LL | let intermediary = &root; | ^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `write_to_mut` at tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC -note: inside `main` +note: error occurred inside `write_to_mut` + --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC + | +LL | fn write_to_mut(m: &mut u8, other_ptr: *const u8) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC | LL | write_to_mut(data, core::ptr::addr_of!(root)); diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr index e257a3511f75e..d61fe47a871b3 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr @@ -23,9 +23,12 @@ help: the protected tag was created here, in the initial state Reserved | LL | let mut protect = |_arg: &mut u32| { | ^^^^ - = note: BACKTRACE (of the first span): - = note: inside closure at tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC -note: inside `main` +note: error occurred inside closure + --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC + | +LL | let mut protect = |_arg: &mut u32| { + | ^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC | LL | protect(wild_ref); diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr index 5486eee4f063f..cd797cdc0c79a 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr @@ -7,9 +7,8 @@ LL | unsafe { *wild = 4 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: there are no exposed tags which may perform this access here - = note: BACKTRACE: - = note: inside closure at tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC -note: inside `main` + = note: this is inside closure +note: which got called inside `main` --> tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC | LL | protect(ref1); diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr index 6e115b22feb11..bcc6b5f5b879c 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr @@ -18,22 +18,25 @@ help: the strongly protected tag was created here, in the initial state Re | LL | fn inner(x: &mut i32, f: fn(usize)) { | ^ - = note: BACKTRACE (of the first span): - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure +note: error occurred inside ` as std::ops::Drop>::drop` + --> RUSTLIB/alloc/src/boxed.rs:LL:CC + | +LL | fn drop(&mut self) { + | ^^^^^^^^^^^^^^^^^^ + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC | LL | drop(unsafe { Box::from_raw(raw as *mut i32) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: inside `<{closure@tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC} as std::ops::FnOnce<(usize,)>>::call_once - shim` at RUSTLIB/core/src/ops/function.rs:LL:CC -note: inside `inner` + = note: which got called inside `<{closure@tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC} as std::ops::FnOnce<(usize,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) +note: which got called inside `inner` --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC | LL | f(x as *mut i32 as usize) | ^^^^^^^^^^^^^^^^^^^^^^^^^ -note: inside `main` +note: which got called inside `main` --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC | LL | / inner(Box::leak(Box::new(0)), |raw| { diff --git a/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr b/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr index 7f55e06a6bb7a..11d148bc872e4 100644 --- a/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr @@ -18,9 +18,12 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *alias = 42; | ^^^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions - = note: BACKTRACE (of the first span): - = note: inside `Foo::add` at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC -note: inside `main` +note: error occurred inside `Foo::add` + --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC + | +LL | fn add(&mut self, n: u64) -> u64 { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside `main` --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC | LL | let res = f.add(unsafe { diff --git a/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr b/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr index ea144f206643a..6fb62b7664400 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr @@ -8,9 +8,8 @@ LL | | T: [const] Destruct, | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `std::ptr::drop_in_place:: - shim(Some(PartialDrop))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` + = note: this is inside `std::ptr::drop_in_place:: - shim(Some(PartialDrop))` +note: which got called inside `main` --> tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC | LL | core::ptr::drop_in_place(p); diff --git a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr index d2a5f83a43daa..61915490917e1 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr @@ -6,9 +6,8 @@ LL | unsafe { (*x).x } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `foo` at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC -note: inside `main` + = note: this is inside `foo` +note: which got called inside `main` --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC | LL | foo(odd_ptr.cast()); diff --git a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr index 39540fc8320d7..58db5dda6a2e8 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr @@ -6,9 +6,8 @@ LL | unsafe { (*x).packed.x } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `foo` at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC -note: inside `main` + = note: this is inside `foo` +note: which got called inside `main` --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC | LL | foo(odd_ptr.cast()); diff --git a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr index a91be376bd16b..56a3bf129ab23 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr @@ -6,9 +6,8 @@ LL | mem::transmute(x) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `raw_to_ref::<'_, i32>` at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC -note: inside `main` + = note: this is inside `raw_to_ref::<'_, i32>` +note: which got called inside `main` --> tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC | LL | let p: &i32 = unsafe { raw_to_ref(ptr::addr_of!(foo.x)) }; diff --git a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr index 25a9bddb42c7c..6a2f038017c0f 100644 --- a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr +++ b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr @@ -6,10 +6,9 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC - = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC -note: inside `main` + = note: this is inside `::compare` + = note: which got called inside `core::slice::cmp::::cmp` (at RUSTLIB/core/src/slice/cmp.rs:LL:CC) +note: which got called inside `main` --> tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC | LL | drop(slice1.cmp(slice2)); diff --git a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr index 305d8d4fbede1..f40e796cca611 100644 --- a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr +++ b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr @@ -6,10 +6,9 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `::compare` at RUSTLIB/core/src/slice/cmp.rs:LL:CC - = note: inside `core::slice::cmp::::cmp` at RUSTLIB/core/src/slice/cmp.rs:LL:CC -note: inside `main` + = note: this is inside `::compare` + = note: which got called inside `core::slice::cmp::::cmp` (at RUSTLIB/core/src/slice/cmp.rs:LL:CC) +note: which got called inside `main` --> tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC | LL | drop(slice1.cmp(slice2)); diff --git a/src/tools/miri/tests/fail/unwind-action-terminate.stderr b/src/tools/miri/tests/fail/unwind-action-terminate.stderr index cf41c88ce3774..c86d94a820259 100644 --- a/src/tools/miri/tests/fail/unwind-action-terminate.stderr +++ b/src/tools/miri/tests/fail/unwind-action-terminate.stderr @@ -14,21 +14,20 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: BACKTRACE: - = note: inside `std::panicking::panic_with_hook` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside closure at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` at RUSTLIB/std/src/sys/backtrace.rs:LL:CC - = note: inside `std::panicking::panic_handler` at RUSTLIB/std/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_nounwind` at RUSTLIB/core/src/panicking.rs:LL:CC - = note: inside `core::panicking::panic_cannot_unwind` at RUSTLIB/core/src/panicking.rs:LL:CC -note: inside `panic_abort` + = note: this is inside `std::panicking::panic_with_hook` + = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) + = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) + = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) +note: which got called inside `panic_abort` --> tests/fail/unwind-action-terminate.rs:LL:CC | LL | / extern "C" fn panic_abort() { LL | | panic!() LL | | } | |_^ -note: inside `main` +note: which got called inside `main` --> tests/fail/unwind-action-terminate.rs:LL:CC | LL | panic_abort(); diff --git a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr index c370e19ef313f..5c7572c76a134 100644 --- a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr +++ b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr @@ -6,9 +6,8 @@ LL | Call(_res = f(*ptr), ReturnTo(retblock), UnwindContinue()) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `call` at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC -note: inside `main` + = note: this is inside `call` +note: which got called inside `main` --> tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC | LL | call(f); diff --git a/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr b/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr index c435e51d6be81..6612bcd223947 100644 --- a/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr @@ -6,9 +6,8 @@ LL | RET = *ptr as u32; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `cast` at tests/fail/validity/invalid_char_cast.rs:LL:CC -note: inside `main` + = note: this is inside `cast` +note: which got called inside `main` --> tests/fail/validity/invalid_char_cast.rs:LL:CC | LL | cast(&v as *const u32 as *const char); diff --git a/src/tools/miri/tests/fail/validity/invalid_char_match.stderr b/src/tools/miri/tests/fail/validity/invalid_char_match.stderr index 141305a001702..cda730172177d 100644 --- a/src/tools/miri/tests/fail/validity/invalid_char_match.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_char_match.stderr @@ -9,9 +9,8 @@ LL | | } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `switch_int` at tests/fail/validity/invalid_char_match.rs:LL:CC -note: inside `main` + = note: this is inside `switch_int` +note: which got called inside `main` --> tests/fail/validity/invalid_char_match.rs:LL:CC | LL | switch_int(&v as *const u32 as *const char); diff --git a/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr b/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr index b2d876419034b..6a4d0e0375af4 100644 --- a/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr @@ -6,9 +6,8 @@ LL | let _val = *ptr as u32; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `cast` at tests/fail/validity/invalid_enum_cast.rs:LL:CC -note: inside `main` + = note: this is inside `cast` +note: which got called inside `main` --> tests/fail/validity/invalid_enum_cast.rs:LL:CC | LL | cast(&v as *const u32 as *const E); diff --git a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr index 99e06e7febf50..605767db22b1c 100644 --- a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr +++ b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr @@ -6,6 +6,7 @@ LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr index 7d03bd9a8eb84..333405a9172b4 100644 --- a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr +++ b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr @@ -17,15 +17,18 @@ help: ALLOC was deallocated here: | LL | dealloc(ptr as *mut u8, Layout::new::()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside `free` at tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC -note: inside closure +note: error occurred on thread `unnamed-ID`, inside `free` + --> tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC + | +LL | unsafe fn free(ptr: *mut u64) { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called inside closure --> tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC | LL | free(b); | ^^^^^^^ - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC}>` + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC}>` --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr index bde793014bbf2..6ec5843c3a0c7 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr @@ -7,10 +7,9 @@ LL | dealloc(b as *mut u8, Layout::new::()); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr index 7bfafe0ca086c..fb29e326ba83e 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr @@ -7,10 +7,9 @@ LL | *b = 42; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr index 0facf6a5d177c..e4af214bfb995 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr @@ -17,10 +17,13 @@ help: ALLOC was deallocated here: | LL | }), | ^ - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC}>` +note: error occurred on thread `unnamed-ID`, inside closure + --> tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC + | +LL | spawn_pthread_closure(|| { + | ^^ + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr index 8e4ed1aba0430..f5986d50bafc9 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr @@ -7,10 +7,9 @@ LL | }), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr index 1ffb55f22e6e0..b061b9029b3d4 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr @@ -7,10 +7,9 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr index b0037c211c69d..ad5047be60c12 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr @@ -7,10 +7,9 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr index b0037c211c69d..ad5047be60c12 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr @@ -7,10 +7,9 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr index b0037c211c69d..ad5047be60c12 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr @@ -7,10 +7,9 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside closure at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` + = note: this is on thread `unnamed-ID`, inside closure + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr b/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr index ad98ba6aeb9a5..abda3e31189ef 100644 --- a/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr +++ b/src/tools/miri/tests/genmc/fail/loom/buggy_inc.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr b/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr index 658914ba088d8..176ab6a573c87 100644 --- a/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr +++ b/src/tools/miri/tests/genmc/fail/loom/store_buffering.genmc.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr b/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr index d2036d464bb58..487ab21f28b32 100644 --- a/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr +++ b/src/tools/miri/tests/genmc/fail/loom/store_buffering.non_genmc.stderr @@ -3,6 +3,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr index db465969cda81..5adfb066e6f17 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr @@ -7,12 +7,11 @@ LL | self.lock.inner.unlock(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::ptr::drop_in_place::>> - shim(Some(EvilSend>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside closure + = note: this is on thread `unnamed-ID`, inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::ptr::drop_in_place::>> - shim(Some(EvilSend>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside closure --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC | LL | drop(guard); diff --git a/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr index 3ba863668f1e8..9fec95ae6770d 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr @@ -7,11 +7,10 @@ LL | self.lock.inner.unlock(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside ` as std::ops::Drop>::drop` at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC - = note: inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC - = note: inside `std::mem::drop::>` at RUSTLIB/core/src/mem/mod.rs:LL:CC -note: inside `miri_start` + = note: this is inside ` as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) + = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) +note: which got called inside `miri_start` --> tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC | LL | drop(guard); diff --git a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr index d6c66bf8f5c45..f7942d8ff749c 100644 --- a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.relaxed4.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr index d6c66bf8f5c45..f7942d8ff749c 100644 --- a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.release4.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr index d6c66bf8f5c45..f7942d8ff749c 100644 --- a/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/2w2w_weak.sc3_rel1.stderr @@ -4,6 +4,8 @@ error: abnormal termination: the program aborted execution | LL | std::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here + | + = note: this is on thread `main` note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr b/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr index 1d56614c7f037..2fc6e3d472297 100644 --- a/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr @@ -6,13 +6,12 @@ LL | AllocInit::Uninitialized => alloc.allocate(layout), | ^^^^^^^^^^^^^^^^^^^^^^ resource exhaustion occurred here | = help: in GenMC mode, the address space is limited to 4GB per thread, and addresses cannot be reused - = note: BACKTRACE: - = note: inside `alloc::raw_vec::RawVecInner::try_allocate_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVecInner::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVec::::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity_in` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC -note: inside `miri_start` + = note: this is inside `alloc::raw_vec::RawVecInner::try_allocate_in` + = note: which got called inside `alloc::raw_vec::RawVecInner::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `alloc::raw_vec::RawVec::::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity_in` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) +note: which got called inside `miri_start` --> tests/genmc/fail/simple/alloc_large.rs:LL:CC | LL | let _v = Vec::::with_capacity(1024 * 1024 * 1024); diff --git a/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr b/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr index 8595612811fd1..dbd39e4727c2a 100644 --- a/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr @@ -6,13 +6,12 @@ LL | AllocInit::Uninitialized => alloc.allocate(layout), | ^^^^^^^^^^^^^^^^^^^^^^ resource exhaustion occurred here | = help: in GenMC mode, the address space is limited to 4GB per thread, and addresses cannot be reused - = note: BACKTRACE: - = note: inside `alloc::raw_vec::RawVecInner::try_allocate_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVecInner::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `alloc::raw_vec::RawVec::::with_capacity_in` at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity_in` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC - = note: inside `std::vec::Vec::::with_capacity` at RUSTLIB/alloc/src/vec/mod.rs:LL:CC -note: inside `miri_start` + = note: this is inside `alloc::raw_vec::RawVecInner::try_allocate_in` + = note: which got called inside `alloc::raw_vec::RawVecInner::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `alloc::raw_vec::RawVec::::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity_in` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) + = note: which got called inside `std::vec::Vec::::with_capacity` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) +note: which got called inside `miri_start` --> tests/genmc/fail/simple/alloc_large.rs:LL:CC | LL | let _v = Vec::::with_capacity(8 * 1024 * 1024 * 1024); diff --git a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr index 31438f9352fe6..71a01d8f754b2 100644 --- a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr +++ b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr @@ -5,15 +5,14 @@ warning: GenMC currently does not model the failure ordering for `compare_exchan LL | match KEY.compare_exchange(KEY_SENTVAL, key, Release, Acquire) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ GenMC might miss possible behaviors of this code | - = note: BACKTRACE on thread `unnamed-ID`: - = note: inside `get_or_init` at tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC -note: inside closure + = note: this is on thread `unnamed-ID`, inside `get_or_init` +note: which got called inside closure --> tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC | LL | let key = get_or_init(0); | ^^^^^^^^^^^^^^ - = note: inside ` as std::ops::FnOnce<()>>::call_once` at RUSTLIB/alloc/src/boxed.rs:LL:CC -note: inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC}>` + = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) +note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC}>` --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC | LL | f(); diff --git a/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr b/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr index 1c0ad2f0dc916..4a7d24090641f 100644 --- a/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr +++ b/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr @@ -9,9 +9,8 @@ LL | init_n(2, slice_ptr); = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `partial_init` at tests/native-lib/fail/tracing/partial_init.rs:LL:CC -note: inside `main` + = note: this is inside `partial_init` +note: which got called inside `main` --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC | LL | partial_init(); @@ -25,9 +24,8 @@ LL | let _val = *slice_ptr.offset(2); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `partial_init` at tests/native-lib/fail/tracing/partial_init.rs:LL:CC -note: inside `main` + = note: this is inside `partial_init` +note: which got called inside `main` --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC | LL | partial_init(); diff --git a/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr b/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr index 2d34dac1b3ff3..825c9666b7499 100644 --- a/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr +++ b/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr @@ -9,9 +9,8 @@ LL | unsafe { do_one_deref(exposed) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `unexposed_reachable_alloc` at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC -note: inside `main` + = note: this is inside `unexposed_reachable_alloc` +note: which got called inside `main` --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC | LL | unexposed_reachable_alloc(); @@ -25,9 +24,8 @@ LL | let _not_ok = *invalid; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE: - = note: inside `unexposed_reachable_alloc` at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC -note: inside `main` + = note: this is inside `unexposed_reachable_alloc` +note: which got called inside `main` --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC | LL | unexposed_reachable_alloc(); diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr index 200eba8050bb5..cbccd8fb62f49 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr @@ -8,9 +8,8 @@ LL | unsafe { print_pointer(&x) }; = help: in particular, Miri assumes that the native call initializes all memory it has access to = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free - = note: BACKTRACE: - = note: inside `test_access_pointer` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_access_pointer` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | test_access_pointer(); @@ -23,9 +22,8 @@ LL | pass_fn_ptr(Some(nop)); // this one is not | ^^^^^^^^^^^^^^^^^^^^^^ sharing a function pointer with a native function | = help: calling Rust functions from C is not supported and will, in the best case, crash the program - = note: BACKTRACE: - = note: inside `pass_fn_ptr` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `pass_fn_ptr` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | pass_fn_ptr(); diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr index 5c0e954deb9b6..2697fb6d4353f 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr @@ -9,9 +9,8 @@ LL | unsafe { print_pointer(&x) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `test_access_pointer` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_access_pointer` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | test_access_pointer(); @@ -24,9 +23,8 @@ LL | pass_fn_ptr(Some(nop)); // this one is not | ^^^^^^^^^^^^^^^^^^^^^^ sharing a function pointer with a native function | = help: calling Rust functions from C is not supported and will, in the best case, crash the program - = note: BACKTRACE: - = note: inside `pass_fn_ptr` at tests/native-lib/pass/ptr_read_access.rs:LL:CC -note: inside `main` + = note: this is inside `pass_fn_ptr` +note: which got called inside `main` --> tests/native-lib/pass/ptr_read_access.rs:LL:CC | LL | pass_fn_ptr(); diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr index c893b0d9f6561..c7edaa3731676 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr @@ -8,9 +8,8 @@ LL | unsafe { increment_int(&mut x) }; = help: in particular, Miri assumes that the native call initializes all memory it has access to = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free - = note: BACKTRACE: - = note: inside `test_increment_int` at tests/native-lib/pass/ptr_write_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_increment_int` +note: which got called inside `main` --> tests/native-lib/pass/ptr_write_access.rs:LL:CC | LL | test_increment_int(); diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr index dbf021b15bec4..dacde45e17a12 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr @@ -9,9 +9,8 @@ LL | unsafe { increment_int(&mut x) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: BACKTRACE: - = note: inside `test_increment_int` at tests/native-lib/pass/ptr_write_access.rs:LL:CC -note: inside `main` + = note: this is inside `test_increment_int` +note: which got called inside `main` --> tests/native-lib/pass/ptr_write_access.rs:LL:CC | LL | test_increment_int(); diff --git a/src/tools/miri/tests/pass/alloc-access-tracking.stderr b/src/tools/miri/tests/pass/alloc-access-tracking.stderr index 745fd89f9f547..b5b1bc2a7bc2b 100644 --- a/src/tools/miri/tests/pass/alloc-access-tracking.stderr +++ b/src/tools/miri/tests/pass/alloc-access-tracking.stderr @@ -24,10 +24,9 @@ note: freed allocation ALLOC LL | self.1.deallocate(From::from(ptr.cast()), layout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tracking was triggered here | - = note: BACKTRACE: - = note: inside `> as std::ops::Drop>::drop` at RUSTLIB/alloc/src/boxed.rs:LL:CC - = note: inside `std::ptr::drop_in_place::>> - shim(Some(std::boxed::Box>))` at RUSTLIB/core/src/ptr/mod.rs:LL:CC -note: inside `main` + = note: this is inside `> as std::ops::Drop>::drop` + = note: which got called inside `std::ptr::drop_in_place::>> - shim(Some(std::boxed::Box>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) +note: which got called inside `main` --> tests/pass/alloc-access-tracking.rs:LL:CC | LL | } From 1514495151d4d2e0aa5a1d7157d1a4ce87e443ce Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 7 Dec 2025 10:20:33 +0100 Subject: [PATCH 2/5] always show the origin_span of the failing thread --- src/tools/miri/src/diagnostics.rs | 40 ++++++++----------- ...pple_os_unfair_lock_move_with_queue.stderr | 10 ++++- .../concurrency/libc_pthread_join_main.stderr | 12 +++++- .../libc_pthread_join_multiple.stderr | 10 ++++- .../concurrency/libc_pthread_join_self.stderr | 13 +++++- .../libc_pthread_mutex_deadlock.stderr | 9 ++++- ...ibc_pthread_mutex_free_while_queued.stderr | 9 +++++ ...ibc_pthread_mutex_read_while_queued.stderr | 10 ++++- ...bc_pthread_mutex_write_while_queued.stderr | 10 ++++- .../libc_pthread_mutex_wrong_owner.stderr | 9 ++++- ...ibc_pthread_rwlock_read_wrong_owner.stderr | 9 ++++- ..._pthread_rwlock_write_read_deadlock.stderr | 9 ++++- ...pthread_rwlock_write_write_deadlock.stderr | 9 ++++- ...bc_pthread_rwlock_write_wrong_owner.stderr | 9 ++++- .../concurrency/windows_join_main.stderr | 11 ++++- .../concurrency/windows_join_self.stderr | 12 +++++- .../libc/env-set_var-data-race.stderr | 12 +++++- .../libc/eventfd_block_read_twice.stderr | 12 +++++- .../libc/eventfd_block_write_twice.stderr | 14 ++++++- .../libc/libc_epoll_block_two_thread.stderr | 11 ++++- .../socketpair-close-while-blocked.stderr | 14 ++++++- .../libc/socketpair_block_read_twice.stderr | 14 ++++++- .../libc/socketpair_block_write_twice.stderr | 14 ++++++- .../retag_data_race_write.stack.stderr | 5 +++ .../retag_data_race_write.tree.stderr | 5 +++ .../fail/data_race/alloc_read_race.stderr | 13 +++++- .../fail/data_race/alloc_write_race.stderr | 12 +++++- .../atomic_read_na_write_race1.stderr | 11 ++++- .../atomic_read_na_write_race2.stderr | 12 +++++- .../atomic_write_na_read_race1.stderr | 12 +++++- .../atomic_write_na_read_race2.stderr | 11 ++++- .../atomic_write_na_write_race1.stderr | 11 ++++- .../atomic_write_na_write_race2.stderr | 12 +++++- .../dangling_thread_async_race.stderr | 10 ++++- .../fail/data_race/dealloc_read_race1.stderr | 13 +++++- .../fail/data_race/dealloc_read_race2.stderr | 11 ++++- .../data_race/dealloc_read_race_stack.stderr | 13 +++++- .../fail/data_race/dealloc_write_race1.stderr | 13 +++++- .../fail/data_race/dealloc_write_race2.stderr | 11 ++++- .../data_race/dealloc_write_race_stack.stderr | 13 +++++- .../enable_after_join_to_main.stderr | 11 ++++- .../local_variable_alloc_race.stderr | 11 ++++- .../data_race/local_variable_read_race.stderr | 12 +++++- .../local_variable_write_race.stderr | 12 +++++- ...ze_read_read_write.match_first_load.stderr | 12 +++++- ...e_read_read_write.match_second_load.stderr | 12 +++++- .../mixed_size_read_write.read_write.stderr | 12 +++++- .../mixed_size_read_write.write_read.stderr | 12 +++++- .../mixed_size_read_write_read.stderr | 9 ++++- .../mixed_size_write_write.fst.stderr | 11 ++++- .../mixed_size_write_write.snd.stderr | 11 ++++- .../fail/data_race/read_write_race.stderr | 11 ++++- .../data_race/read_write_race_stack.stderr | 12 +++++- .../fail/data_race/relax_acquire_race.stderr | 13 +++++- .../fail/data_race/release_seq_race.stderr | 13 +++++- .../release_seq_race_same_thread.stderr | 13 +++++- .../miri/tests/fail/data_race/rmw_race.stderr | 13 +++++- .../fail/data_race/write_write_race.stderr | 11 ++++- .../data_race/write_write_race_stack.stderr | 12 +++++- src/tools/miri/tests/fail/shims/ctor_ub.rs | 39 ++++++++++++++++++ .../miri/tests/fail/shims/ctor_ub.stderr | 23 +++++++++++ .../retag_data_race_protected_read.stderr | 13 +++++- .../retag_data_race_read.stderr | 5 +++ .../reservedim_spurious_write.with.stderr | 14 ++++++- .../reservedim_spurious_write.without.stderr | 14 ++++++- .../fail/tree_borrows/spurious_read.stderr | 12 ++++++ .../tests/fail/weak_memory/weak_uninit.stderr | 7 +++- .../atomics/atomic_ptr_double_free.stderr | 10 +++++ .../atomic_ptr_alloc_race.dealloc.stderr | 10 +++++ .../atomic_ptr_alloc_race.write.stderr | 10 +++++ .../atomic_ptr_dealloc_write_race.stderr | 10 +++++ .../atomic_ptr_write_dealloc_race.stderr | 10 +++++ .../genmc/fail/data_race/mpu2_rels_rlx.stderr | 10 +++++ .../data_race/weak_orderings.rel_rlx.stderr | 10 +++++ .../data_race/weak_orderings.rlx_acq.stderr | 10 +++++ .../data_race/weak_orderings.rlx_rlx.stderr | 10 +++++ .../miri/tests/genmc/fail/shims/exit.stderr | 8 ++++ .../shims/mutex_diff_thread_unlock.stderr | 9 +++++ .../cas_failure_ord_racy_key_init.stderr | 10 +++++ 79 files changed, 854 insertions(+), 83 deletions(-) create mode 100644 src/tools/miri/tests/fail/shims/ctor_ub.rs create mode 100644 src/tools/miri/tests/fail/shims/ctor_ub.stderr diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index fb4029d104544..8de30d870327a 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -555,35 +555,24 @@ fn report_msg<'tcx>( thread: Option, machine: &MiriMachine<'tcx>, ) { - let span = match stacktrace.first() { - Some(fi) => fi.span, - None => - match thread { - Some(thread_id) => machine.threads.thread_ref(thread_id).origin_span, - // This fallback is super rare, but can happen e.g. when `main` has the wrong ABI - None => DUMMY_SP, - }, - }; - let sess = machine.tcx.sess; + let origin_span = thread.map(|t| machine.threads.thread_ref(t).origin_span).unwrap_or(DUMMY_SP); + let span = stacktrace.first().map(|fi| fi.span).unwrap_or(origin_span); + // The only time we do not have an origin span is for `main`, and there we check the signature + // upfront. So we should always have a span here. + assert!(!span.is_dummy()); + + let tcx = machine.tcx; let level = match diag_level { DiagLevel::Error => Level::Error, DiagLevel::Warning => Level::Warning, DiagLevel::Note => Level::Note, }; - let mut err = Diag::<()>::new(sess.dcx(), level, title); + let mut err = Diag::<()>::new(tcx.sess.dcx(), level, title); err.span(span); // Show main message. - if !span.is_dummy() { - for line in span_msg { - err.span_label(span, line); - } - } else { - // Make sure we show the message even when it is a dummy span. - for line in span_msg { - err.note(line); - } - err.note("(no span available)"); + for line in span_msg { + err.span_label(span, line); } // Show note and help messages. @@ -621,7 +610,7 @@ fn report_msg<'tcx>( .unwrap(); } // Only print function name if we show a backtrace - if rest.len() > 0 { + if rest.len() > 0 || !origin_span.is_dummy() { if !fn_and_thread.is_empty() { fn_and_thread.push_str(", "); } @@ -632,7 +621,7 @@ fn report_msg<'tcx>( // Print a `span_note` as otherwise the backtrace looks attached to the last // `span_help`. We somewhat arbitrarily use the span of the surrounding function. err.span_note( - machine.tcx.def_span(first.instance.def_id()), + tcx.def_span(first.instance.def_id()), format!("{level} occurred {fn_and_thread}"), ); } else { @@ -646,11 +635,14 @@ fn report_msg<'tcx>( if is_local { err.span_note(frame_info.span, format!("which got called {frame_info}")); } else { - let sm = sess.source_map(); + let sm = tcx.sess.source_map(); let span = sm.span_to_diagnostic_string(frame_info.span); err.note(format!("which got called {frame_info} (at {span})")); } } + if !origin_span.is_dummy() { + err.span_note(origin_span, format!("which got called indirectly due to this code")); + } } else if !span.is_dummy() { err.note(format!("this {level} occurred while pushing a call frame onto an empty stack")); err.note("the span indicates which code caused the function to be called, but may not be the literal call site"); diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr index e86395fae201a..b943ac1f61ef4 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr @@ -6,7 +6,15 @@ LL | let _val = atomic_ref.load(Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let atomic_ref = unsafe { &*lock.get().cast::() }; +LL | | ... let _val = atomic_ref.load(Ordering::Relaxed); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index 85d7fae892d19..c364642fc6296 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr @@ -6,7 +6,17 @@ LL | ... assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC + | +LL | let handle = thread::spawn(move || { + | __________________^ +LL | | unsafe { +LL | | assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); +LL | | } +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr index 72c778fd0beb9..b9bf801eaf614 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr @@ -6,7 +6,15 @@ LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC + | +LL | ... let handle = thread::spawn(move || { + | ____________________^ +LL | | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr index 250b9ef9dfa1c..ddf3372a72772 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr @@ -6,7 +6,18 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC + | +LL | let handle = thread::spawn(|| { + | __________________^ +LL | | unsafe { +LL | | let native: libc::pthread_t = libc::pthread_self(); +LL | | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); +LL | | } +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr index db4811b52a3a1..1e7b0abf341ac 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -22,7 +22,14 @@ error: the evaluated program deadlocked LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC + | +LL | / thread::spawn(move || { +LL | | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); +LL | | }) + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr index cd6f6563469e9..765604ea00602 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr @@ -14,6 +14,15 @@ note: which got called inside closure | LL | drop(unsafe { Box::from_raw(m.get().cast::()) }); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | // Ensure we happen-after the initialization write. +LL | | assert!(initialized.load(Ordering::Acquire)); +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr index 6b46b6f1a7f9c..fd9cddebabc7d 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr @@ -6,7 +6,15 @@ LL | ... let _val = atomic_ref.load(Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let atomic_ref = unsafe { &*m.get().byte_add(OFFSET).cast::() }; +LL | | ... let _val = atomic_ref.load(Ordering::Relaxed); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr index 641150a9d31ed..02a0f25af4926 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr @@ -6,7 +6,15 @@ LL | atomic_ref.store(0, Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | let atomic_ref = unsafe { &*m.get().byte_add(OFFSET).cast::() }; +LL | | atomic_ref.store(0, Ordering::Relaxed); +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index 39765c8ec830c..25dae98ef5d9c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr @@ -6,7 +6,14 @@ LL | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0 | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC + | +LL | / ... thread::spawn(move || { +LL | | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0); +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr index 3b90bd446e54d..37c7540afb27c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr @@ -6,7 +6,14 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC + | +LL | / ... thread::spawn(move || { +LL | | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0); +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr index c1722e33b6157..0818f213f5e71 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr @@ -22,7 +22,14 @@ error: the evaluated program deadlocked LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC + | +LL | / thread::spawn(move || { +LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); +LL | | }) + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index ce1e0d83c7724..4ee88c0059d2d 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr @@ -22,7 +22,14 @@ error: the evaluated program deadlocked LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC + | +LL | / thread::spawn(move || { +LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); +LL | | }) + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index 0a4037305c77e..94578338f40b3 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr @@ -6,7 +6,14 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC + | +LL | / ... thread::spawn(move || { +LL | | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), 0); +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr index d07f16eb6a997..ee0aa254abafa 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr @@ -23,7 +23,16 @@ error: the evaluated program deadlocked LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC + | +LL | / thread::spawn(|| { +LL | | unsafe { +LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); +LL | | } +LL | | }) + | |______^ = note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr index d82e273677e4d..561464d471795 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr @@ -25,7 +25,17 @@ error: the evaluated program deadlocked LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC + | +LL | / thread::spawn(|| { +LL | | unsafe { +LL | | let native = GetCurrentThread(); +LL | | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); +LL | | } +LL | | }) + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr index c326bb8c3c3f9..eed33569af11e 100644 --- a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr @@ -11,7 +11,17 @@ LL | env::set_var("MY_RUST_VAR", "Ferris"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC + | +LL | let t = thread::spawn(|| unsafe { + | _____________^ +LL | | // Access the environment in another thread without taking the env lock. +LL | | // This represents some C code that queries the environment. +LL | | libc::getenv(b"TZ/0".as_ptr().cast()); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr index dc34f4748cd27..d0c8169fe7d2c 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr @@ -19,7 +19,17 @@ error: the evaluated program deadlocked LL | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8).try_into().unwrap() }; | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | let mut buf: [u8; 8] = [0; 8]; +... | +LL | | assert_eq!(counter, 1_u64); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr index 3758484bb05e9..878059cb5ef29 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr @@ -19,7 +19,19 @@ error: the evaluated program deadlocked LL | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8).try_into().unwrap() | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | let sized_8_data = (u64::MAX - 1).to_ne_bytes(); +LL | | // Write u64::MAX - 1, so that all subsequent writes will block. +LL | | let res: i64 = unsafe { +... | +LL | | assert_eq!(res, 8); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr index e883bd9bd0257..f7f77647acb5f 100644 --- a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr +++ b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr @@ -19,7 +19,16 @@ error: the evaluated program deadlocked LL | check_epoll_wait::(epfd, &expected, -1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | check_epoll_wait::(epfd, &expected, -1); +LL | | +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr index a7d0b60dfcb32..b1b1fddc6735d 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr @@ -19,7 +19,19 @@ error: the evaluated program deadlocked LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC + | +LL | let thread1 = thread::spawn(move || { + | ___________________^ +LL | | let mut buf: [u8; 1] = [0; 1]; +LL | | let _res: i32 = unsafe { +LL | | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) +... | +LL | | }; +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr index a817f2867284e..a556ba592ec8c 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr @@ -19,7 +19,19 @@ error: the evaluated program deadlocked LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | // Let this thread block on read. +LL | | let mut buf: [u8; 1] = [0; 1]; +LL | | let res = unsafe { +... | +LL | | assert_eq!(&buf, "a".as_bytes()); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr index 18e6222589f00..259ca6bd83474 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr @@ -19,7 +19,19 @@ error: the evaluated program deadlocked LL | let res = unsafe { libc::write(fds[0], data.as_ptr() as *const libc::c_void, data.len()) }; | ^ thread got stuck here | - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC + | +LL | let thread2 = thread::spawn(move || { + | ___________________^ +LL | | let data = "a".as_bytes(); +LL | | // The write below will be blocked because the buffer is already full. +LL | | let res = unsafe { libc::write(fds[0], data.as_ptr() as *const libc::c_void, data.len()) }; +LL | | +LL | | assert_eq!(res, data.len().cast_signed()); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr index 8624205444bce..d1dbdbc67f1bb 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -24,6 +24,11 @@ note: which got called inside closure | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | let t2 = std::thread::spawn(move || thread_2(p)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr index 6d1dff0d5f533..47abf74cb8a29 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -24,6 +24,11 @@ note: which got called inside closure | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + | +LL | let t2 = std::thread::spawn(move || thread_2(p)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr index c9e9059ef0853..67edbfb4658e8 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr @@ -11,7 +11,18 @@ LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relax | ^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/alloc_read_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... let pointer = &*ptr.0; +... | +LL | | ... *pointer.load(Ordering::Relaxed) +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr index 110c013ec0cc6..33c562958e204 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr @@ -11,7 +11,17 @@ LL | .store(Box::into_raw(Box::::new_uninit()) as *mut us | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/alloc_write_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... let pointer = &*ptr.0; +LL | | ... *pointer.load(Ordering::Relaxed) = 2; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr index 2d0317c7ffdff..6f0332e46fa3d 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -11,7 +11,16 @@ LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... (&*c.0).load(Ordering::SeqCst) +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr index a5c1006e31f6e..13f95e85242ae 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -11,7 +11,17 @@ LL | atomic_ref.load(Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... let atomic_ref = &mut *c.0; +LL | | ... *atomic_ref.get_mut() = 32; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr index bef2f1f6fa1a8..0907ed3cd0a3e 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -11,7 +11,17 @@ LL | atomic_ref.store(32, Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... let atomic_ref = &mut *c.0; +LL | | ... *atomic_ref.get_mut() +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr index 56c6695491061..dfc7ed0127252 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -11,7 +11,16 @@ LL | let _val = *(c.0 as *mut usize); | ^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... (&*c.0).store(32, Ordering::SeqCst); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr index 3b79801bfab8c..018db8364ed0d 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -11,7 +11,16 @@ LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... (&*c.0).store(64, Ordering::SeqCst); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr index 069dc9ac8de81..ef5521448676a 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -11,7 +11,17 @@ LL | atomic_ref.store(64, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... let atomic_ref = &mut *c.0; +LL | | ... *atomic_ref.get_mut() = 32; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr index a01f85ab6ce13..da13b62b1cf09 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr @@ -11,7 +11,15 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC + | +LL | / ... spawn(move || { +LL | | ... let c = c; // capture `c`, not just its field. +LL | | ... *c.0 = 64; +LL | | ... }) + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr index afe1125e7514c..798c6c490b4c3 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr @@ -16,7 +16,18 @@ LL | let _val = *ptr.0; | ^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | __rust_dealloc( +... | +LL | | ); +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr index a741203dcf6d5..4a9e6e832b8e4 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr @@ -20,7 +20,16 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ) | |_____________^ - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr index 4adf3f3d58d3b..8b8cfaf9930c0 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -11,7 +11,18 @@ LL | *pointer.load(Ordering::Acquire) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC + | +LL | ... let j1 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... let pointer = &*ptr.0; +... | +LL | | ... } +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr index cfa4f06f9a9fe..18924d7d65cea 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr @@ -16,7 +16,18 @@ LL | *ptr.0 = 2; | ^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +LL | | __rust_dealloc( +... | +LL | | ); +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr index 3a843a4eba5d9..2029e0632141b 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr @@ -20,7 +20,16 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ); | |_____________^ - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC + | +LL | let j2 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr index 708fddb8f0be0..3ce6e6ce56615 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -11,7 +11,18 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC + | +LL | ... let j1 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +LL | | ... let pointer = &*ptr.0; +... | +LL | | ... } +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr index adcf00c8a88ff..f9a18008ab75e 100644 --- a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr @@ -11,7 +11,16 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... *c.0 = 64; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr index 676a62b8fefe6..6caeacfb5e257 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr @@ -11,7 +11,16 @@ LL | StorageLive(val); | ^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/local_variable_alloc_race.rs:LL:CC + | +LL | / std::thread::spawn(|| { +LL | | while P.load(Relaxed).is_null() { +LL | | std::hint::spin_loop(); +... | +LL | | }) + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr index 269676caf5c71..5dfa6917e3bac 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr @@ -11,7 +11,17 @@ LL | let _val = val; | ^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/local_variable_read_race.rs:LL:CC + | +LL | let t1 = std::thread::spawn(|| { + | ______________^ +LL | | while P.load(Relaxed).is_null() { +LL | | std::hint::spin_loop(); +... | +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr index 5e26e88ce98c9..2f9e22f66fff6 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr @@ -11,7 +11,17 @@ LL | let mut val: u8 = 0; | ^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/local_variable_write_race.rs:LL:CC + | +LL | let t1 = std::thread::spawn(|| { + | ______________^ +LL | | while P.load(Relaxed).is_null() { +LL | | std::hint::spin_loop(); +... | +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr index 95b41a232b2cc..10b5539a5b8cc 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr @@ -13,7 +13,17 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | thread::yield_now(); // make sure this happens last +LL | | if cfg!(match_first_load) { +LL | | a16.store(0, Ordering::SeqCst); +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr index 96b0c00e08cc8..8e37e6161c31c 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr @@ -13,7 +13,17 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | thread::yield_now(); // make sure this happens last +LL | | if cfg!(match_first_load) { +LL | | a16.store(0, Ordering::SeqCst); +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr index e795f7ec81202..ec86c41cd1602 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr @@ -13,7 +13,17 @@ LL | a8[0].load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | if cfg!(read_write) { +LL | | // Let the other one go first. +LL | | thread::yield_now(); +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr index ecdbb49e8b869..d4d03b96a3e50 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr @@ -13,7 +13,17 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | if cfg!(write_read) { +LL | | // Let the other one go first. +LL | | thread::yield_now(); +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr index be1bb4e507f65..98565708f881e 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr @@ -19,7 +19,14 @@ LL | | ); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_read_write_read.rs:LL:CC + | +LL | / ... s.spawn(|| { +LL | | ... let _val = data.load(Ordering::Relaxed); +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr index 0b1eac5d5d032..9033bc2c922d5 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr @@ -13,7 +13,16 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | let idx = if cfg!(fst) { 0 } else { 1 }; +LL | | a8[idx].store(1, Ordering::SeqCst); +LL | | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr index da62f537903af..b0e771c40b913 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr @@ -13,7 +13,16 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC + | +LL | / s.spawn(|| { +LL | | let idx = if cfg!(fst) { 0 } else { 1 }; +LL | | a8[idx].store(1, Ordering::SeqCst); +LL | | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/read_write_race.stderr b/src/tools/miri/tests/fail/data_race/read_write_race.stderr index 9163bff917e4f..1922ce949f6b4 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race.stderr @@ -11,7 +11,16 @@ LL | let _val = *c.0; | ^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/read_write_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... *c.0 = 64; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr index 719a7162690a3..a6bdac409d9da 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr @@ -11,7 +11,17 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/read_write_race_stack.rs:LL:CC + | +LL | ... let j1 = spawn(move || { + | ________________^ +LL | | ... let ptr = ptr; // avoid field capturing +... | +LL | | ... stack_var +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr index ea441ab36722a..6c77bf6b3d8bd 100644 --- a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr +++ b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr @@ -11,7 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/relax_acquire_race.rs:LL:CC + | +LL | ... let j3 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... if SYNC.load(Ordering::Acquire) == 2 { +LL | | ... *c.0 +... | +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr index 8cb1fd7ce6136..528db7ed24799 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr @@ -11,7 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/release_seq_race.rs:LL:CC + | +LL | let j3 = spawn(move || { + | __________________^ +LL | | let c = c; // avoid field capturing +LL | | sleep(Duration::from_millis(500)); +LL | | if SYNC.load(Ordering::Acquire) == 3 { +... | +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr index d9a4b71ca21fb..1b2daf8b256b4 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -11,7 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... if SYNC.load(Ordering::Acquire) == 2 { +LL | | ... *c.0 +... | +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/rmw_race.stderr b/src/tools/miri/tests/fail/data_race/rmw_race.stderr index c1eeef1dca766..21f710e16b0da 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/tests/fail/data_race/rmw_race.stderr @@ -11,7 +11,18 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/rmw_race.rs:LL:CC + | +LL | ... let j3 = spawn(move || { + | ________________^ +LL | | ... let c = c; // capture `c`, not just its field. +LL | | ... if SYNC.load(Ordering::Acquire) == 3 { +LL | | ... *c.0 +... | +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/write_write_race.stderr b/src/tools/miri/tests/fail/data_race/write_write_race.stderr index 13f798e4da569..112cdb278196b 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race.stderr @@ -11,7 +11,16 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/write_write_race.rs:LL:CC + | +LL | ... let j2 = spawn(move || { + | ________________^ +LL | | ... let c = c; // avoid field capturing +LL | | ... *c.0 = 64; +LL | | ... }); + | |________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr index eb8c2747b40e9..c70dbb4e619f7 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr @@ -11,7 +11,17 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/data_race/write_write_race_stack.rs:LL:CC + | +LL | let j1 = spawn(move || { + | __________________^ +LL | | let ptr = ptr; // avoid field capturing +... | +LL | | stack_var +LL | | }); + | |__________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/shims/ctor_ub.rs b/src/tools/miri/tests/fail/shims/ctor_ub.rs new file mode 100644 index 0000000000000..860f602e69d05 --- /dev/null +++ b/src/tools/miri/tests/fail/shims/ctor_ub.rs @@ -0,0 +1,39 @@ +unsafe extern "C" fn ctor() { + std::hint::unreachable_unchecked() + //~^ERROR: unreachable +} + +#[rustfmt::skip] +macro_rules! ctor { + ($ident:ident = $ctor:ident) => { + #[cfg_attr( + all(any( + target_os = "linux", + target_os = "android", + target_os = "dragonfly", + target_os = "freebsd", + target_os = "haiku", + target_os = "illumos", + target_os = "netbsd", + target_os = "openbsd", + target_os = "solaris", + target_os = "none", + target_family = "wasm", + )), + link_section = ".init_array" + )] + #[cfg_attr(windows, link_section = ".CRT$XCU")] + #[cfg_attr( + any(target_os = "macos", target_os = "ios"), + // We do not set the `mod_init_funcs` flag here since ctor/inventory also do not do + // that. See . + link_section = "__DATA,__mod_init_func" + )] + #[used] + static $ident: unsafe extern "C" fn() = $ctor; + }; +} + +ctor! { CTOR = ctor } + +fn main() {} diff --git a/src/tools/miri/tests/fail/shims/ctor_ub.stderr b/src/tools/miri/tests/fail/shims/ctor_ub.stderr new file mode 100644 index 0000000000000..ab8a8f633638d --- /dev/null +++ b/src/tools/miri/tests/fail/shims/ctor_ub.stderr @@ -0,0 +1,23 @@ +error: Undefined Behavior: entering unreachable code + --> tests/fail/shims/ctor_ub.rs:LL:CC + | +LL | std::hint::unreachable_unchecked() + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here + | + = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior + = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is inside `ctor` +note: which got called indirectly due to this code + --> tests/fail/shims/ctor_ub.rs:LL:CC + | +LL | static $ident: unsafe extern "C" fn() = $ctor; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +LL | ctor! { CTOR = ctor } + | --------------------- in this macro invocation + = note: this error originates in the macro `ctor` (in Nightly builds, run with -Z macro-backtrace for more info) + +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace + +error: aborting due to 1 previous error + diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr index c8662628c033e..f50b05712ee2f 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr @@ -14,7 +14,18 @@ LL | unsafe { ptr.0.read() }; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC + | +LL | let t = thread::spawn(move || { + | _____________^ +LL | | let ptr = ptr; +LL | | // We do a protected mutable retag (but no write!) in this thread. +LL | | fn retag(_x: &mut i32) {} +LL | | retag(unsafe { &mut *ptr.0 }); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr index 3a95e13f5bc01..67b1cdab911a2 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -24,6 +24,11 @@ note: which got called inside closure | LL | let t2 = std::thread::spawn(move || thread_2(p)); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC + | +LL | let t2 = std::thread::spawn(move || thread_2(p)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index c5a0b58c21853..3567340f22024 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -32,7 +32,19 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *x = 64; | ^^^^^^^ = help: this transition corresponds to a loss of read and write permissions - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC + | +LL | let thread_2 = thread::spawn(move || { + | ____________________^ +LL | | let b = (2, by); +LL | | synchronized!(b, "start"); +LL | | let ptr = ptr; +... | +LL | | synchronized!(b, "end"); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index 75c11f09ce522..a28730abd9534 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -32,7 +32,19 @@ help: the accessed tag later transitioned to Disabled due to a protector r LL | } | ^ = help: this transition corresponds to a loss of read and write permissions - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC + | +LL | let thread_2 = thread::spawn(move || { + | ____________________^ +LL | | let b = (2, by); +LL | | synchronized!(b, "start"); +LL | | let ptr = ptr; +... | +LL | | synchronized!(b, "end"); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr index eef8766fd652e..9e20ec238ed86 100644 --- a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr @@ -41,6 +41,18 @@ note: which got called inside closure | LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/fail/tree_borrows/spurious_read.rs:LL:CC + | +LL | let thread_y = thread::spawn(move || { + | ____________________^ +LL | | let b = (2, by); +LL | | synchronized!(b, "start"); +LL | | let ptr = ptr; +... | +LL | | synchronized!(b, "end"); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr index 605767db22b1c..9f3792e0e4095 100644 --- a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr +++ b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr @@ -6,7 +6,12 @@ LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID` + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/fail/weak_memory/weak_uninit.rs:LL:CC + | +LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr index 333405a9172b4..85e2810f1f304 100644 --- a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr +++ b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr @@ -33,6 +33,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr index 6ec5843c3a0c7..4bca53961f5fe 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr index fb29e326ba83e..0a03363285b69 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr index e4af214bfb995..29a2e371bb3c8 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr @@ -28,6 +28,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr index f5986d50bafc9..3f5d0bdf346e9 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr index b061b9029b3d4..48b8a16c8b10c 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr index ad5047be60c12..2eb3791aaf08f 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr index ad5047be60c12..2eb3791aaf08f 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr index ad5047be60c12..2eb3791aaf08f 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr @@ -14,6 +14,16 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/shims/exit.stderr b/src/tools/miri/tests/genmc/fail/shims/exit.stderr index f27860b82fe73..573c8b14fae35 100644 --- a/src/tools/miri/tests/genmc/fail/shims/exit.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/exit.stderr @@ -7,6 +7,14 @@ LL | unsafe { std::hint::unreachable_unchecked() }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID`, inside closure +note: which got called indirectly due to this code + --> tests/genmc/fail/shims/exit.rs:LL:CC + | +LL | / std::thread::spawn(|| { +LL | | unsafe { std::hint::unreachable_unchecked() }; +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr index 5adfb066e6f17..e32548c4b5d51 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr @@ -16,6 +16,15 @@ note: which got called inside closure | LL | drop(guard); | ^^^^^^^^^^^ +note: which got called indirectly due to this code + --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC + | +LL | let handle = std::thread::spawn(move || { + | __________________^ +LL | | let guard = guard; // avoid field capturing +LL | | drop(guard); +LL | | }); + | |______^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr index 71a01d8f754b2..6d597aaa6342d 100644 --- a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr +++ b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr @@ -17,5 +17,15 @@ note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{clos | LL | f(); | ^^^ +note: which got called indirectly due to this code + --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC + | +LL | / libc::pthread_create( +LL | | &raw mut thread_id, +LL | | attr, +LL | | thread_func::, +LL | | Box::into_raw(f) as *mut c_void, +LL | | ) + | |_________^ Verification complete with 2 executions. No errors found. From b12b766cf33791020f453198f1545592c424c3c3 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sun, 7 Dec 2025 10:43:07 +0100 Subject: [PATCH 3/5] fix previously dead android tests and remove some dangling files --- src/tools/miri/ci/ci.sh | 2 +- .../libc/prctl-get-name-buffer-too-small.rs | 2 +- .../prctl-get-name-buffer-too-small.stderr | 10 +++---- .../libc/socketpair_read_blocking.stderr | 13 ---------- .../libc/socketpair_write_blocking.stderr | 13 ---------- .../data_race/mixed_size_write_write.stderr | 22 ---------------- .../retag_data_race_read.stack.stderr | 25 ------------------ .../retag_data_race_read.tree.stderr | 26 ------------------- 8 files changed, 6 insertions(+), 107 deletions(-) delete mode 100644 src/tools/miri/tests/fail-dep/libc/socketpair_read_blocking.stderr delete mode 100644 src/tools/miri/tests/fail-dep/libc/socketpair_write_blocking.stderr delete mode 100644 src/tools/miri/tests/fail/data_race/mixed_size_write_write.stderr delete mode 100644 src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr delete mode 100644 src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr diff --git a/src/tools/miri/ci/ci.sh b/src/tools/miri/ci/ci.sh index 2d27f02749991..2dd8fc77459a0 100755 --- a/src/tools/miri/ci/ci.sh +++ b/src/tools/miri/ci/ci.sh @@ -152,7 +152,7 @@ case $HOST_TARGET in # Partially supported targets (tier 2) BASIC="empty_main integer heap_alloc libc-mem vec string btreemap" # ensures we have the basics: pre-main code, system allocator UNIX="hello panic/panic panic/unwind concurrency/simple atomic libc-mem libc-misc libc-random env num_cpus" # the things that are very similar across all Unixes, and hence easily supported there - TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd + TEST_TARGET=aarch64-linux-android run_tests_minimal $BASIC $UNIX time hashmap random thread sync concurrency epoll eventfd prctl TEST_TARGET=wasm32-unknown-unknown run_tests_minimal no_std empty_main wasm # this target doesn't really have std TEST_TARGET=thumbv7em-none-eabihf run_tests_minimal no_std ;; diff --git a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs index 4b731866aca1d..d923667d87419 100644 --- a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs +++ b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs @@ -5,6 +5,6 @@ fn main() { let mut buf = vec![0u8; 15]; unsafe { - libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr().cast::()); //~ ERROR: memory access failed: expected a pointer to 16 bytes of memory, but got alloc952 which is only 15 bytes from the end of the allocation + libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr().cast::()); //~ ERROR: memory access failed } } diff --git a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr index 275a38e593c8f..cc50564a43f5a 100644 --- a/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr +++ b/src/tools/miri/tests/fail-dep/libc/prctl-get-name-buffer-too-small.stderr @@ -1,18 +1,16 @@ -error: Undefined Behavior: memory access failed: expected a pointer to 16 bytes of memory, but got ALLOC which is only 15 bytes from the end of the allocation - --> tests/fail-dep/libc/prctl-threadname.rs:LL:CC +error: Undefined Behavior: memory access failed: attempting to access 16 bytes, but got ALLOC which is only 15 bytes from the end of the allocation + --> tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs:LL:CC | LL | libc::prctl(libc::PR_GET_NAME, buf.as_mut_ptr().cast::()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ memory access failed: expected a pointer to 16 bytes of memory, but got ALLOC which is only 15 bytes from the end of the allocation + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Undefined Behavior occurred here | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information help: ALLOC was allocated here: - --> tests/fail-dep/libc/prctl-threadname.rs:LL:CC + --> tests/fail-dep/libc/prctl-get-name-buffer-too-small.rs:LL:CC | LL | let mut buf = vec![0u8; 15]; | ^^^^^^^^^^^^^ - = note: BACKTRACE (of the first span): - = note: inside `main` at tests/fail-dep/libc/prctl-threadname.rs:LL:CC = note: this error originates in the macro `vec` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_read_blocking.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_read_blocking.stderr deleted file mode 100644 index caf23da1150f4..0000000000000 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_read_blocking.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: deadlock: the evaluated program deadlocked - --> tests/fail-dep/libc/socketpair_read_blocking.rs:LL:CC - | -LL | let _res = unsafe { libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) }; - | ^ the evaluated program deadlocked - | - = note: BACKTRACE: - = note: inside `main` at tests/fail-dep/libc/socketpair_read_blocking.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_write_blocking.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_write_blocking.stderr deleted file mode 100644 index 2dc420d5f1ef4..0000000000000 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_write_blocking.stderr +++ /dev/null @@ -1,13 +0,0 @@ -error: deadlock: the evaluated program deadlocked - --> tests/fail-dep/libc/socketpair_write_blocking.rs:LL:CC - | -LL | let _ = unsafe { libc::write(fds[0], data as *const libc::c_void, 3) }; - | ^ the evaluated program deadlocked - | - = note: BACKTRACE: - = note: inside `main` at tests/fail-dep/libc/socketpair_write_blocking.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.stderr deleted file mode 100644 index 1f22413bc5f93..0000000000000 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.stderr +++ /dev/null @@ -1,22 +0,0 @@ -error: Undefined Behavior: Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC - | -LL | a8[0].store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Race condition detected between (1) 2-byte atomic store on thread `unnamed-ID` and (2) 1-byte atomic store on thread `unnamed-ID` at ALLOC. (2) just happened here - | -help: and (1) occurred earlier here - --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC - | -LL | a16.store(1, Ordering::SeqCst); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = help: overlapping unsynchronized atomic accesses must use the same access size - = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model - = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior - = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE (of the first span) on thread `unnamed-ID`: - = note: inside closure at tests/fail/data_race/mixed_size_write_write.rs:LL:CC - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr deleted file mode 100644 index 1d7ea18982d1d..0000000000000 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr +++ /dev/null @@ -1,25 +0,0 @@ -error: Undefined Behavior: Data race detected between (1) Read on thread `unnamed-ID` and (2) Write on thread `unnamed-ID` at ALLOC. (2) just happened here - --> $DIR/retag_data_race_read.rs:LL:CC - | -LL | *p = 5; - | ^^^^^^ Data race detected between (1) Read on thread `unnamed-ID` and (2) Write on thread `unnamed-ID` at ALLOC. (2) just happened here - | -help: and (1) occurred earlier here - --> $DIR/retag_data_race_read.rs:LL:CC - | -LL | let _r = &*p; - | ^^^ - = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior - = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: BACKTRACE (of the first span): - = note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC -note: inside closure - --> $DIR/retag_data_race_read.rs:LL:CC - | -LL | let t2 = std::thread::spawn(move || thread_2(p)); - | ^^^^^^^^^^^ - -note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace - -error: aborting due to 1 previous error - diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr deleted file mode 100644 index e6c1745d321c1..0000000000000 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.tree.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: Undefined Behavior: reborrow through (root of the allocation) is forbidden - --> RUSTLIB/std/src/rt.rs:LL:CC - | -LL | panic::catch_unwind(move || unsafe { init(argc, argv, sigpipe) }).map_err(rt_abort)?; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow through (root of the allocation) is forbidden - | - = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental - = help: the accessed tag (root of the allocation) is foreign to the protected tag (i.e., it is not a child) - = help: this reborrow (acting as a foreign read access) would cause the protected tag (currently Active) to become Disabled - = help: protected tags must never be Disabled -help: the accessed tag was created here - --> RUSTLIB/std/src/rt.rs:LL:CC - | -LL | panic::catch_unwind(move || unsafe { init(argc, argv, sigpipe) }).map_err(rt_abort)?; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -help: the protected tag was created here, in the initial state Active - --> RUSTLIB/std/src/panic.rs:LL:CC - | -LL | fn catch_unwind R + UnwindSafe, R>(f: F) -> Result { - | ^ - = note: BACKTRACE (of the first span): - = note: inside `std::rt::lang_start_internal` at RUSTLIB/std/src/rt.rs:LL:CC - = note: inside `std::rt::lang_start::<()>` at RUSTLIB/std/src/rt.rs:LL:CC - -error: aborting due to 1 previous error - From 58715c3cceb1e644692f3d736a0b155509b8ab4b Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Tue, 30 Dec 2025 19:28:01 +0100 Subject: [PATCH 4/5] make backtrace look a lot like panics --- src/tools/miri/src/diagnostics.rs | 71 +++++++------------ ...pple_os_unfair_lock_move_with_queue.stderr | 4 +- .../libc_pthread_cond_move.init.stderr | 11 ++- ...thread_cond_move.static_initializer.stderr | 11 ++- .../libc_pthread_create_too_few_args.stderr | 1 + .../libc_pthread_create_too_many_args.stderr | 1 + .../concurrency/libc_pthread_join_main.stderr | 4 +- .../libc_pthread_join_multiple.stderr | 4 +- .../concurrency/libc_pthread_join_self.stderr | 4 +- .../libc_pthread_mutex_deadlock.stderr | 25 ++++--- ...ibc_pthread_mutex_free_while_queued.stderr | 20 +++--- .../libc_pthread_mutex_move.init.stderr | 11 ++- ...hread_mutex_move.static_initializer.stderr | 11 ++- ...ibc_pthread_mutex_read_while_queued.stderr | 4 +- ...bc_pthread_mutex_write_while_queued.stderr | 4 +- .../libc_pthread_mutex_wrong_owner.stderr | 4 +- ...ibc_pthread_rwlock_read_wrong_owner.stderr | 4 +- ..._pthread_rwlock_write_read_deadlock.stderr | 25 ++++--- ...pthread_rwlock_write_write_deadlock.stderr | 25 ++++--- ...bc_pthread_rwlock_write_wrong_owner.stderr | 4 +- .../concurrency/windows_join_detached.stderr | 18 ++--- .../concurrency/windows_join_main.stderr | 26 ++++--- .../concurrency/windows_join_self.stderr | 28 ++++---- .../libc/env-set_var-data-race.stderr | 4 +- .../libc/eventfd_block_read_twice.stderr | 22 +++--- .../libc/eventfd_block_write_twice.stderr | 22 +++--- .../libc/fs/mkstemp_immutable_arg.stderr | 11 ++- .../fs/unix_open_missing_required_mode.stderr | 11 ++- .../libc/libc_epoll_block_two_thread.stderr | 22 +++--- .../socketpair-close-while-blocked.stderr | 22 +++--- .../libc/socketpair_block_read_twice.stderr | 22 +++--- .../libc/socketpair_block_write_twice.stderr | 22 +++--- .../fail/alloc/alloc_error_handler.stderr | 26 ++++--- .../alloc/alloc_error_handler_custom.stderr | 26 +++---- .../alloc/alloc_error_handler_no_std.stderr | 20 +++--- .../fail/alloc/global_system_mixup.stderr | 14 ++-- .../miri/tests/fail/alloc/stack_free.stderr | 17 ++--- .../fail/async-shared-mutable.stack.stderr | 25 +++---- .../fail/async-shared-mutable.tree.stderr | 25 +++---- .../both_borrows/aliasing_mut1.stack.stderr | 15 ++-- .../both_borrows/aliasing_mut1.tree.stderr | 15 ++-- .../both_borrows/aliasing_mut2.stack.stderr | 15 ++-- .../both_borrows/aliasing_mut2.tree.stderr | 15 ++-- .../both_borrows/aliasing_mut3.stack.stderr | 15 ++-- .../both_borrows/aliasing_mut3.tree.stderr | 15 ++-- .../both_borrows/aliasing_mut4.stack.stderr | 15 ++-- .../both_borrows/aliasing_mut4.tree.stderr | 28 +++----- .../box_exclusive_violation1.stack.stderr | 22 ++---- .../box_exclusive_violation1.tree.stderr | 22 ++---- .../box_noalias_violation.stack.stderr | 15 ++-- .../box_noalias_violation.tree.stderr | 15 ++-- .../buggy_split_at_mut.stack.stderr | 15 ++-- .../both_borrows/illegal_write6.stack.stderr | 15 ++-- .../both_borrows/illegal_write6.tree.stderr | 15 ++-- ...invalidate_against_protector2.stack.stderr | 15 ++-- .../invalidate_against_protector2.tree.stderr | 15 ++-- ...invalidate_against_protector3.stack.stderr | 15 ++-- .../invalidate_against_protector3.tree.stderr | 15 ++-- .../issue-miri-1050-1.stack.stderr | 18 ++--- .../issue-miri-1050-1.tree.stderr | 18 ++--- .../issue-miri-1050-2.stack.stderr | 14 ++-- .../issue-miri-1050-2.tree.stderr | 14 ++-- .../mut_exclusive_violation1.stack.stderr | 22 ++---- .../mut_exclusive_violation1.tree.stderr | 22 ++---- .../newtype_pair_retagging.stack.stderr | 35 +++------ .../newtype_pair_retagging.tree.stderr | 38 ++++------ .../newtype_retagging.stack.stderr | 35 +++------ .../newtype_retagging.tree.stderr | 38 ++++------ .../retag_data_race_write.stack.stderr | 18 ++--- .../retag_data_race_write.tree.stderr | 18 ++--- .../return_invalid_shr.stack.stderr | 15 ++-- .../return_invalid_shr.tree.stderr | 15 ++-- .../return_invalid_shr_option.stack.stderr | 15 ++-- .../return_invalid_shr_option.tree.stderr | 15 ++-- .../return_invalid_shr_tuple.stack.stderr | 15 ++-- .../return_invalid_shr_tuple.tree.stderr | 15 ++-- .../shr_frozen_violation1.stack.stderr | 22 ++---- .../shr_frozen_violation1.tree.stderr | 22 ++---- .../miri/tests/fail/box-cell-alias.stderr | 15 ++-- .../fail/closures/uninhabited-variant.stderr | 11 ++- .../concurrency/mutex-leak-move-deadlock.rs | 1 + .../mutex-leak-move-deadlock.stderr | 5 -- .../tests/fail/coroutine-pinned-moved.stderr | 25 +++---- .../dangling_pointer_to_raw_pointer.stderr | 11 ++- .../storage_dead_dangling.stderr | 11 ++- .../fail/data_race/alloc_read_race.stderr | 4 +- .../fail/data_race/alloc_write_race.stderr | 4 +- .../atomic_read_na_write_race1.stderr | 4 +- .../atomic_read_na_write_race2.stderr | 4 +- .../atomic_write_na_read_race1.stderr | 4 +- .../atomic_write_na_read_race2.stderr | 4 +- .../atomic_write_na_write_race1.stderr | 4 +- .../atomic_write_na_write_race2.stderr | 4 +- .../dangling_thread_async_race.stderr | 4 +- .../fail/data_race/dealloc_read_race1.stderr | 4 +- .../fail/data_race/dealloc_read_race2.stderr | 4 +- .../data_race/dealloc_read_race_stack.stderr | 4 +- .../fail/data_race/dealloc_write_race1.stderr | 4 +- .../fail/data_race/dealloc_write_race2.stderr | 4 +- .../data_race/dealloc_write_race_stack.stderr | 4 +- .../enable_after_join_to_main.stderr | 4 +- .../local_variable_alloc_race.stderr | 4 +- .../data_race/local_variable_read_race.stderr | 4 +- .../local_variable_write_race.stderr | 4 +- ...ze_read_read_write.match_first_load.stderr | 4 +- ...e_read_read_write.match_second_load.stderr | 4 +- .../mixed_size_read_write.read_write.stderr | 4 +- .../mixed_size_read_write.write_read.stderr | 4 +- .../mixed_size_read_write_read.stderr | 4 +- .../mixed_size_write_write.fst.stderr | 4 +- .../mixed_size_write_write.snd.stderr | 4 +- .../fail/data_race/read_write_race.stderr | 4 +- .../data_race/read_write_race_stack.stderr | 4 +- .../fail/data_race/relax_acquire_race.stderr | 4 +- .../fail/data_race/release_seq_race.stderr | 4 +- .../release_seq_race_same_thread.stderr | 4 +- .../miri/tests/fail/data_race/rmw_race.stderr | 4 +- .../fail/data_race/write_write_race.stderr | 4 +- .../data_race/write_write_race_stack.stderr | 4 +- ...et-discriminant-niche-variant-wrong.stderr | 11 ++- .../arg_inplace_mutate.stack.stderr | 15 ++-- .../arg_inplace_mutate.tree.stderr | 15 ++-- .../arg_inplace_observe_during.none.stderr | 11 ++- .../arg_inplace_observe_during.stack.stderr | 15 ++-- .../arg_inplace_observe_during.tree.stderr | 15 ++-- .../exported_symbol_bad_unwind2.both.stderr | 19 +---- ...orted_symbol_bad_unwind2.definition.stderr | 19 +---- .../return_pointer_aliasing_read.none.stderr | 11 ++- .../return_pointer_aliasing_read.stack.stderr | 15 ++-- .../return_pointer_aliasing_read.tree.stderr | 15 ++-- ...return_pointer_aliasing_write.stack.stderr | 15 ++-- .../return_pointer_aliasing_write.tree.stderr | 15 ++-- ...nter_aliasing_write_tail_call.stack.stderr | 15 ++-- ...inter_aliasing_write_tail_call.tree.stderr | 15 ++-- .../simd_feature_flag_difference.stderr | 11 ++- .../ptr_metadata_uninit_slice_data.stderr | 11 ++- .../ptr_metadata_uninit_slice_len.stderr | 11 ++- .../ptr_metadata_uninit_thin.stderr | 11 ++- .../typed-swap-invalid-array.stderr | 11 ++- .../typed-swap-invalid-scalar.left.stderr | 11 ++- .../typed-swap-invalid-scalar.right.stderr | 11 ++- .../miri/tests/fail/issue-miri-1112.stderr | 11 ++- src/tools/miri/tests/fail/memleak_rc.stderr | 11 ++- .../miri/tests/fail/never_transmute_void.rs | 2 - .../tests/fail/never_transmute_void.stderr | 11 ++- .../tests/fail/overlapping_assignment.stderr | 11 ++- .../miri/tests/fail/panic/abort_unwind.stderr | 13 +--- .../miri/tests/fail/panic/bad_unwind.stderr | 20 +++--- .../miri/tests/fail/panic/double_panic.stderr | 15 +--- src/tools/miri/tests/fail/panic/no_std.stderr | 11 ++- .../miri/tests/fail/panic/panic_abort1.stderr | 29 ++++---- .../miri/tests/fail/panic/panic_abort2.stderr | 29 ++++---- .../miri/tests/fail/panic/panic_abort3.stderr | 29 ++++---- .../miri/tests/fail/panic/panic_abort4.stderr | 29 ++++---- .../fail/panic/tls_macro_const_drop_panic.rs | 1 + .../tests/fail/panic/tls_macro_drop_panic.rs | 3 +- .../fail/panic/tls_macro_drop_panic.stderr | 1 + .../provenance/provenance_transmute.stderr | 11 ++- .../tests/fail/ptr_swap_nonoverlapping.stderr | 10 +-- .../miri/tests/fail/shims/ctor_ub.stderr | 3 +- .../tests/fail/shims/fs/isolated_file.stderr | 41 ++++++----- .../tests/fail/shims/isolated_stdin.stderr | 4 -- .../deallocate_against_protector1.stderr | 37 ++++------ .../drop_in_place_protector.stderr | 21 +++--- .../drop_in_place_retag.stderr | 17 ++--- .../invalidate_against_protector1.stderr | 15 ++-- .../stacked_borrows/pointer_smuggling.stderr | 15 ++-- .../retag_data_race_protected_read.stderr | 4 +- .../retag_data_race_read.stderr | 18 ++--- .../stacked_borrows/return_invalid_mut.stderr | 15 ++-- .../return_invalid_mut_option.stderr | 15 ++-- .../return_invalid_mut_tuple.stderr | 15 ++-- .../tests/fail/tail_calls/cc-mismatch.stderr | 40 +++++++---- .../fail/tail_calls/dangling-local-var.stderr | 15 ++-- .../tests/fail/terminate-terminator.stderr | 25 +------ .../miri/tests/fail/tls_macro_leak.stderr | 19 +++-- .../fail/tree_borrows/outside-range.stderr | 15 ++-- .../fail/tree_borrows/pass_invalid_mut.stderr | 15 ++-- ...peated_foreign_read_lazy_conflicted.stderr | 15 ++-- .../reserved/cell-protected-write.stderr | 15 ++-- .../reserved/int-protected-write.stderr | 15 ++-- .../reservedim_spurious_write.with.stderr | 4 +- .../reservedim_spurious_write.without.stderr | 4 +- .../fail/tree_borrows/spurious_read.stderr | 18 ++--- .../tree_borrows/strongly-protected.stderr | 40 ++++------- ...tree_traversal_skipping_diagnostics.stderr | 15 ++-- .../wildcard/protected_wildcard.stderr | 15 ++-- .../wildcard/protector_conflicted.stderr | 11 ++- .../strongly_protected_wildcard.stderr | 40 ++++------- .../tree_borrows/write-during-2phase.stderr | 21 ++---- .../unaligned_pointers/drop_in_place.stderr | 11 ++- ...ld_requires_parent_struct_alignment.stderr | 11 ++- ...d_requires_parent_struct_alignment2.stderr | 11 ++- .../reference_to_packed.stderr | 11 ++- .../uninit/uninit_alloc_diagnostic.stderr | 14 ++-- ...it_alloc_diagnostic_with_provenance.stderr | 14 ++-- .../tests/fail/unwind-action-terminate.stderr | 19 +---- .../cast_fn_ptr_invalid_caller_arg.stderr | 11 ++- .../fail/validity/invalid_char_cast.stderr | 11 ++- .../fail/validity/invalid_char_match.stderr | 11 ++- .../fail/validity/invalid_enum_cast.stderr | 11 ++- .../tests/fail/weak_memory/weak_uninit.stderr | 4 +- .../atomics/atomic_ptr_double_free.stderr | 28 +++----- .../atomic_ptr_alloc_race.dealloc.stderr | 17 ++--- .../atomic_ptr_alloc_race.write.stderr | 17 ++--- .../atomic_ptr_dealloc_write_race.stderr | 21 +++--- .../atomic_ptr_write_dealloc_race.stderr | 17 ++--- .../genmc/fail/data_race/mpu2_rels_rlx.stderr | 17 ++--- .../data_race/weak_orderings.rel_rlx.stderr | 17 ++--- .../data_race/weak_orderings.rlx_acq.stderr | 17 ++--- .../data_race/weak_orderings.rlx_rlx.stderr | 17 ++--- .../miri/tests/genmc/fail/shims/exit.stderr | 4 +- .../shims/mutex_diff_thread_unlock.stderr | 23 +++--- .../fail/shims/mutex_double_unlock.stderr | 17 ++--- .../fail/simple/alloc_large.multiple.stderr | 23 +++--- .../fail/simple/alloc_large.single.stderr | 23 +++--- .../cas_failure_ord_racy_key_init.stderr | 24 +++---- .../fail/tracing/partial_init.stderr | 22 +++--- .../tracing/unexposed_reachable_alloc.stderr | 22 +++--- .../pass/ptr_read_access.notrace.stderr | 22 +++--- .../pass/ptr_read_access.trace.stderr | 22 +++--- .../pass/ptr_write_access.notrace.stderr | 11 ++- .../pass/ptr_write_access.trace.stderr | 11 ++- src/tools/miri/tests/panic/panic1.stderr | 8 +-- .../tests/pass/alloc-access-tracking.stderr | 14 ++-- .../backtrace/backtrace-global-alloc.stderr | 28 ++++---- .../tests/pass/backtrace/backtrace-std.stderr | 36 +++++----- src/tools/miri/tests/ui.rs | 2 - 228 files changed, 1381 insertions(+), 1927 deletions(-) diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs index 8de30d870327a..1f87ac60c17a8 100644 --- a/src/tools/miri/src/diagnostics.rs +++ b/src/tools/miri/src/diagnostics.rs @@ -576,11 +576,9 @@ 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); } @@ -588,60 +586,41 @@ fn report_msg<'tcx>( for (span_data, help) in helps { if let Some(span_data) = span_data { err.span_help(span_data.span(), help); - extra_span = true; } else { err.help(help); } } + // Only print thread name if there are multiple threads. + if let Some(thread) = thread + && machine.threads.get_total_thread_count() > 1 + { + err.note(format!( + "this is on thread `{}`", + machine.threads.get_thread_display_name(thread) + )); + } // Add backtrace - if let Some((first, rest)) = stacktrace.split_first() { - // Start with the function and thread that contain the first span. - let mut fn_and_thread = String::new(); - // Only print thread name if there are multiple threads. - if let Some(thread) = thread - && machine.threads.get_total_thread_count() > 1 - { - write!( - fn_and_thread, - "on thread `{}`", - machine.threads.get_thread_display_name(thread) - ) - .unwrap(); - } - // Only print function name if we show a backtrace - if rest.len() > 0 || !origin_span.is_dummy() { - if !fn_and_thread.is_empty() { - fn_and_thread.push_str(", "); - } - write!(fn_and_thread, "{first}").unwrap(); - } - if !fn_and_thread.is_empty() { - if extra_span && rest.len() > 0 { - // Print a `span_note` as otherwise the backtrace looks attached to the last - // `span_help`. We somewhat arbitrarily use the span of the surrounding function. - err.span_note( - tcx.def_span(first.instance.def_id()), - format!("{level} occurred {fn_and_thread}"), - ); - } else { - err.note(format!("this is {fn_and_thread}")); - } - } - // Continue with where that function got called. - for frame_info in rest.iter() { - let is_local = machine.is_local(frame_info.instance); - // No span for non-local frames and the first frame (which is the error site). - if is_local { - err.span_note(frame_info.span, format!("which got called {frame_info}")); - } else { - let sm = tcx.sess.source_map(); + if stacktrace.len() > 0 { + // Skip it if we'd only shpw the span we have already shown + if stacktrace.len() > 1 { + let sm = tcx.sess.source_map(); + let mut out = format!("stack backtrace:"); + for (idx, frame_info) in stacktrace.iter().enumerate() { let span = sm.span_to_diagnostic_string(frame_info.span); - err.note(format!("which got called {frame_info} (at {span})")); + write!(out, "\n{idx}: {}", frame_info.instance).unwrap(); + write!(out, "\n at {span}").unwrap(); } + err.note(out); } + // For TLS dtors and non-main threads, show the "origin" if !origin_span.is_dummy() { - err.span_note(origin_span, format!("which got called indirectly due to this code")); + let what = if stacktrace.len() > 1 { + "the last function in that backtrace" + } else { + "the current function" + }; + err.span_note(origin_span, format!("{what} got called indirectly due to this code")); } } else if !span.is_dummy() { err.note(format!("this {level} occurred while pushing a call frame onto an empty stack")); diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr index b943ac1f61ef4..b4d2d2be6530c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.stderr @@ -6,8 +6,8 @@ LL | let _val = atomic_ref.load(Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs:LL:CC | LL | / ... s.spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr index 4507c1bfa227e..4e494e1d2a2c6 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.init.stderr @@ -6,12 +6,11 @@ LL | libc::pthread_cond_destroy(cond2.as_mut_ptr()); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `check` -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC - | -LL | check() - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr index 6132785b13dda..8b8ead3976f96 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_cond_move.static_initializer.stderr @@ -6,12 +6,11 @@ LL | libc::pthread_cond_destroy(&mut cond2 as *mut _); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `check` -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC - | -LL | check() - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_cond_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr index fef91e85470d9..979a1a8337b52 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_few_args.stderr @@ -6,6 +6,7 @@ LL | libc::pthread_create(&mut native, ptr::null(), thread_start, pt | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` = note: this error occurred while pushing a call frame onto an empty stack = note: the span indicates which code caused the function to be called, but may not be the literal call site diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr index 4d70576d784c1..e8ad65a74ac8e 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_create_too_many_args.stderr @@ -6,6 +6,7 @@ LL | libc::pthread_create(&mut native, ptr::null(), thread_start, pt | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information + = note: this is on thread `unnamed-ID` = note: this error occurred while pushing a call frame onto an empty stack = note: the span indicates which code caused the function to be called, but may not be the literal call site diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr index c364642fc6296..0d07c2bfa351b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_main.stderr @@ -6,8 +6,8 @@ LL | ... assert_eq!(libc::pthread_join(thread_id, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_join_main.rs:LL:CC | LL | let handle = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr index b9bf801eaf614..8754aaecef944 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_multiple.stderr @@ -6,8 +6,8 @@ LL | ... assert_eq!(libc::pthread_join(native_copy, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_join_multiple.rs:LL:CC | LL | ... let handle = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr index ddf3372a72772..ffc7f2fe4cacb 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_join_self.stderr @@ -6,8 +6,8 @@ LL | assert_eq!(libc::pthread_join(native, ptr::null_mut()), 0); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_join_self.rs:LL:CC | LL | let handle = thread::spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr index 1e7b0abf341ac..468c0e63cc34c 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.stderr @@ -4,17 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC - | -LL | / thread::spawn(move || { -LL | | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); -LL | | }) -LL | | .join() - | |_______________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC @@ -22,8 +21,8 @@ error: the evaluated program deadlocked LL | assert_eq!(libc::pthread_mutex_lock(lock_copy.0.get() as *mut _), 0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_mutex_deadlock.rs:LL:CC | LL | / thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr index 765604ea00602..96be3f5764a3b 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.stderr @@ -6,15 +6,17 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside ` as std::ops::Drop>::drop` - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC - | -LL | drop(unsafe { Box::from_raw(m.get().cast::()) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0}::{closure#2} + at tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_mutex_free_while_queued.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr index f9e06c75e06df..389b014ed6471 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.init.stderr @@ -6,12 +6,11 @@ LL | libc::pthread_mutex_lock(&mut m2 as *mut _); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `check` -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC - | -LL | check(); - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr index 643518c606175..ba281a548c241 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_move.static_initializer.stderr @@ -6,12 +6,11 @@ LL | libc::pthread_mutex_unlock(&mut m2 as *mut _); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `check` -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC - | -LL | check(); - | ^^^^^^^ + = note: stack backtrace: + 0: check + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC + 1: main + at tests/fail-dep/concurrency/libc_pthread_mutex_move.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr index fd9cddebabc7d..a8d9679eb9594 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.stderr @@ -6,8 +6,8 @@ LL | ... let _val = atomic_ref.load(Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_mutex_read_while_queued.rs:LL:CC | LL | / ... s.spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr index 02a0f25af4926..9bc413fe8d53f 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.stderr @@ -6,8 +6,8 @@ LL | atomic_ref.store(0, Ordering::Relaxed); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_mutex_write_while_queued.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr index 25dae98ef5d9c..0a1de63325626 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.stderr @@ -6,8 +6,8 @@ LL | ... assert_eq!(libc::pthread_mutex_unlock(lock_copy.0.get() as *mut _), 0 | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_mutex_wrong_owner.rs:LL:CC | LL | / ... thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr index 37c7540afb27c..d077c6a552ae5 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.stderr @@ -6,8 +6,8 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_rwlock_read_wrong_owner.rs:LL:CC | LL | / ... thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr index 0818f213f5e71..e00c297a9b298 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.stderr @@ -4,17 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC - | -LL | / thread::spawn(move || { -LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); -LL | | }) -LL | | .join() - | |_______________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC @@ -22,8 +21,8 @@ error: the evaluated program deadlocked LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_read_deadlock.rs:LL:CC | LL | / thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr index 4ee88c0059d2d..21fa8dcbd18de 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.stderr @@ -4,17 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC - | -LL | / thread::spawn(move || { -LL | | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); -LL | | }) -LL | | .join() - | |_______________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC @@ -22,8 +21,8 @@ error: the evaluated program deadlocked LL | assert_eq!(libc::pthread_rwlock_wrlock(lock_copy.0.get() as *mut _), 0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_write_deadlock.rs:LL:CC | LL | / thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr index 94578338f40b3..ceba695ce5fb7 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.stderr @@ -6,8 +6,8 @@ LL | ... assert_eq!(libc::pthread_rwlock_unlock(lock_copy.0.get() as *mut _), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/libc_pthread_rwlock_write_wrong_owner.rs:LL:CC | LL | / ... thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr index 1765f0a18041b..73e79852d63a1 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_detached.stderr @@ -6,14 +6,16 @@ LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle( | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC - | -LL | thread.join().unwrap(); - | ^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/windows_join_detached.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr index ee0aa254abafa..3d324ad0bdefa 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_main.stderr @@ -4,18 +4,16 @@ error: the evaluated program deadlocked LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC - | -LL | / thread::spawn(|| { -LL | | unsafe { -LL | | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); -... | -LL | | .join() - | |___________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/windows_join_main.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC @@ -23,8 +21,8 @@ error: the evaluated program deadlocked LL | assert_eq!(WaitForSingleObject(MAIN_THREAD, INFINITE), WAIT_OBJECT_0); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/windows_join_main.rs:LL:CC | LL | / thread::spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr index 561464d471795..8f28324363b33 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr +++ b/src/tools/miri/tests/fail-dep/concurrency/windows_join_self.stderr @@ -4,20 +4,16 @@ error: the evaluated program deadlocked LL | let rc = unsafe { c::WaitForSingleObject(self.handle.as_raw_handle(), c::INFINITE) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC - | -LL | / thread::spawn(|| { -LL | | unsafe { -LL | | let native = GetCurrentThread(); -LL | | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); -LL | | } -LL | | }) -LL | | .join() - | |___________^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/concurrency/windows_join_self.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC @@ -25,8 +21,8 @@ error: the evaluated program deadlocked LL | assert_eq!(WaitForSingleObject(native, INFINITE), WAIT_OBJECT_0); | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/concurrency/windows_join_self.rs:LL:CC | LL | / thread::spawn(|| { diff --git a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr index eed33569af11e..635091cc0173d 100644 --- a/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr +++ b/src/tools/miri/tests/fail-dep/libc/env-set_var-data-race.stderr @@ -11,8 +11,8 @@ LL | env::set_var("MY_RUST_VAR", "Ferris"); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/env-set_var-data-race.rs:LL:CC | LL | let t = thread::spawn(|| unsafe { diff --git a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr index d0c8169fe7d2c..f5cfd35847af4 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_read_twice.stderr @@ -4,14 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC @@ -19,8 +21,8 @@ error: the evaluated program deadlocked LL | let res: i64 = unsafe { libc::read(fd, buf.as_mut_ptr().cast(), 8).try_into().unwrap() }; | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/eventfd_block_read_twice.rs:LL:CC | LL | let thread2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr index 878059cb5ef29..92c3fc47c4fd6 100644 --- a/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/eventfd_block_write_twice.stderr @@ -4,14 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC @@ -19,8 +21,8 @@ error: the evaluated program deadlocked LL | libc::write(fd, sized_8_data.as_ptr() as *const libc::c_void, 8).try_into().unwrap() | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/eventfd_block_write_twice.rs:LL:CC | LL | let thread2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr b/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr index ec7b681dfad41..edf428ae8ddaa 100644 --- a/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fs/mkstemp_immutable_arg.stderr @@ -6,12 +6,11 @@ LL | let _fd = unsafe { libc::mkstemp(s) }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `test_mkstemp_immutable_arg` -note: which got called inside `main` - --> tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC - | -LL | test_mkstemp_immutable_arg(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_mkstemp_immutable_arg + at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC + 1: main + at tests/fail-dep/libc/fs/mkstemp_immutable_arg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr b/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr index 9f5ea4ed021f8..a85fae9c7dd27 100644 --- a/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr +++ b/src/tools/miri/tests/fail-dep/libc/fs/unix_open_missing_required_mode.stderr @@ -6,12 +6,11 @@ LL | let _fd = unsafe { libc::open(name_ptr, libc::O_CREAT) }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `test_file_open_missing_needed_mode` -note: which got called inside `main` - --> tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC - | -LL | test_file_open_missing_needed_mode(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_file_open_missing_needed_mode + at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC + 1: main + at tests/fail-dep/libc/fs/unix_open_missing_required_mode.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr index f7f77647acb5f..af6578357a591 100644 --- a/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr +++ b/src/tools/miri/tests/fail-dep/libc/libc_epoll_block_two_thread.stderr @@ -4,14 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC @@ -19,8 +21,8 @@ error: the evaluated program deadlocked LL | check_epoll_wait::(epfd, &expected, -1); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/libc_epoll_block_two_thread.rs:LL:CC | LL | let thread2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr index b1b1fddc6735d..b40c35d6d2667 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair-close-while-blocked.stderr @@ -4,14 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC - | -LL | thread1.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC @@ -19,8 +21,8 @@ error: the evaluated program deadlocked LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/socketpair-close-while-blocked.rs:LL:CC | LL | let thread1 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr index a556ba592ec8c..d649076374f57 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_read_twice.stderr @@ -4,14 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC @@ -19,8 +21,8 @@ error: the evaluated program deadlocked LL | libc::read(fds[1], buf.as_mut_ptr().cast(), buf.len() as libc::size_t) | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/socketpair_block_read_twice.rs:LL:CC | LL | let thread2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr index 259ca6bd83474..66f3359a1292c 100644 --- a/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr +++ b/src/tools/miri/tests/fail-dep/libc/socketpair_block_write_twice.stderr @@ -4,14 +4,16 @@ error: the evaluated program deadlocked LL | let ret = unsafe { libc::pthread_join(id, ptr::null_mut()) }; | ^ thread got stuck here | - = note: this is on thread `main`, inside `std::sys::thread::PLATFORM::Thread::join` - = note: which got called inside `std::thread::lifecycle::JoinInner::<'_, ()>::join` (at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC) - = note: which got called inside `std::thread::JoinHandle::<()>::join` (at RUSTLIB/std/src/thread/join_handle.rs:LL:CC) -note: which got called inside `main` - --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC - | -LL | thread2.join().unwrap(); - | ^^^^^^^^^^^^^^ + = note: this is on thread `main` + = note: stack backtrace: + 0: std::sys::thread::PLATFORM::Thread::join + at RUSTLIB/std/src/sys/thread/PLATFORM.rs:LL:CC + 1: std::thread::lifecycle::JoinInner::join + at RUSTLIB/std/src/thread/lifecycle.rs:LL:CC + 2: std::thread::JoinHandle::join + at RUSTLIB/std/src/thread/join_handle.rs:LL:CC + 3: main + at tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC error: the evaluated program deadlocked --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC @@ -19,8 +21,8 @@ error: the evaluated program deadlocked LL | let res = unsafe { libc::write(fds[0], data.as_ptr() as *const libc::c_void, data.len()) }; | ^ thread got stuck here | - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail-dep/libc/socketpair_block_write_twice.rs:LL:CC | LL | let thread2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr index bd62bf148d7a4..ed9b7ad18b0fa 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler.stderr @@ -7,17 +7,21 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort() | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside closure - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::alloc::rust_oom::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::alloc::rust_oom` (at RUSTLIB/std/src/alloc.rs:LL:CC) - = note: which got called inside `std::alloc::_::__rust_alloc_error_handler` (at RUSTLIB/std/src/alloc.rs:LL:CC) - = note: which got called inside `std::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) - = note: which got called inside `std::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/alloc/alloc_error_handler.rs:LL:CC - | -LL | handle_alloc_error(Layout::for_value(&0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::alloc::rust_oom::{closure#0} + at RUSTLIB/std/src/alloc.rs:LL:CC + 1: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 2: std::alloc::rust_oom + at RUSTLIB/std/src/alloc.rs:LL:CC + 3: std::alloc::_::__rust_alloc_error_handler + at RUSTLIB/std/src/alloc.rs:LL:CC + 4: std::alloc::handle_alloc_error::rt_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 5: std::alloc::handle_alloc_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 6: main + at tests/fail/alloc/alloc_error_handler.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr index 7e7871dc89bca..677fa1b1bb9c0 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler_custom.stderr @@ -5,21 +5,17 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `alloc_error_handler` -note: which got called inside `_::__rust_alloc_error_handler` - --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC - | -LL | #[alloc_error_handler] - | ---------------------- in this attribute macro expansion -LL | fn alloc_error_handler(layout: Layout) -> ! { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `alloc::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) - = note: which got called inside `alloc::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) -note: which got called inside `miri_start` - --> tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC - | -LL | handle_alloc_error(Layout::for_value(&0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: alloc_error_handler + at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC + 1: _::__rust_alloc_error_handler + at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC + 2: alloc::alloc::handle_alloc_error::rt_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 3: alloc::alloc::handle_alloc_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 4: miri_start + at tests/fail/alloc/alloc_error_handler_custom.rs:LL:CC error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr b/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr index b126cb042beea..386e7cdc2bd81 100644 --- a/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr +++ b/src/tools/miri/tests/fail/alloc/alloc_error_handler_no_std.stderr @@ -7,15 +7,17 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `panic_handler` - = note: which got called inside `alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) - = note: which got called inside `alloc::alloc::handle_alloc_error::rt_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) - = note: which got called inside `alloc::alloc::handle_alloc_error` (at RUSTLIB/alloc/src/alloc.rs:LL:CC) -note: which got called inside `miri_start` - --> tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC - | -LL | handle_alloc_error(Layout::for_value(&0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: panic_handler + at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC + 1: alloc::alloc::__alloc_error_handler::__rdl_alloc_error_handler + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 2: alloc::alloc::handle_alloc_error::rt_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 3: alloc::alloc::handle_alloc_error + at RUSTLIB/alloc/src/alloc.rs:LL:CC + 4: miri_start + at tests/fail/alloc/alloc_error_handler_no_std.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr index 27464a5a29e8c..4214e3e7675ba 100644 --- a/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr +++ b/src/tools/miri/tests/fail/alloc/global_system_mixup.stderr @@ -6,13 +6,13 @@ LL | FREE(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `std::sys::alloc::PLATFORM::::dealloc` - = note: which got called inside `::deallocate` (at RUSTLIB/std/src/alloc.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/alloc/global_system_mixup.rs:LL:CC - | -LL | unsafe { System.deallocate(ptr, l) }; - | ^ + = note: stack backtrace: + 0: std::sys::alloc::PLATFORM::dealloc + at RUSTLIB/std/src/sys/alloc/PLATFORM.rs:LL:CC + 1: ::deallocate + at RUSTLIB/std/src/alloc.rs:LL:CC + 2: main + at tests/fail/alloc/global_system_mixup.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/alloc/stack_free.stderr b/src/tools/miri/tests/fail/alloc/stack_free.stderr index ec052fcb6b9af..deb42c0986794 100644 --- a/src/tools/miri/tests/fail/alloc/stack_free.stderr +++ b/src/tools/miri/tests/fail/alloc/stack_free.stderr @@ -6,14 +6,15 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside ` as std::ops::Drop>::drop` - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/alloc/stack_free.rs:LL:CC - | -LL | drop(bad_box); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main + at tests/fail/alloc/stack_free.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr index 9949dad128674..7cedb24a25644 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.stack.stderr @@ -20,22 +20,15 @@ help: was later invalidated at offsets [OFFSET] by a SharedReadOnly retag | LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ^^^^^^^^^^ -note: error occurred inside closure - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | core::future::poll_fn(move |_| { - | ^^^^^^^^ - = note: which got called inside ` as std::future::Future>::poll` (at RUSTLIB/core/src/future/poll_fn.rs:LL:CC) -note: which got called inside closure - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | .await - | ^^^^^ -note: which got called inside `main` - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0}::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 1: as std::future::Future>::poll + at RUSTLIB/core/src/future/poll_fn.rs:LL:CC + 2: main::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 3: main + at tests/fail/async-shared-mutable.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr b/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr index c204f75c4f21b..fb68161837683 100644 --- a/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr +++ b/src/tools/miri/tests/fail/async-shared-mutable.tree.stderr @@ -28,22 +28,15 @@ help: the accessed tag later transitioned to Frozen due to a reborrow (act LL | let _: Pin<&_> = f.as_ref(); // Or: `f.as_mut().into_ref()`. | ^^^^^^^^^^ = help: this transition corresponds to a loss of write permissions -note: error occurred inside closure - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | core::future::poll_fn(move |_| { - | ^^^^^^^^ - = note: which got called inside ` as std::future::Future>::poll` (at RUSTLIB/core/src/future/poll_fn.rs:LL:CC) -note: which got called inside closure - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | .await - | ^^^^^ -note: which got called inside `main` - --> tests/fail/async-shared-mutable.rs:LL:CC - | -LL | assert_eq!(f.as_mut().poll(&mut cx), Poll::Pending); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0}::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 1: as std::future::Future>::poll + at RUSTLIB/core/src/future/poll_fn.rs:LL:CC + 2: main::{closure#0} + at tests/fail/async-shared-mutable.rs:LL:CC + 3: main + at tests/fail/async-shared-mutable.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr index bb5e731545b7c..cdd668f1f6330 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn safe(x: &mut i32, y: &mut i32) { | ^ -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC - | -LL | fn safe(x: &mut i32, y: &mut i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC - | -LL | safe_raw(xraw, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr index 34f56696e0003..d26a0fc0586ed 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut1.tree.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | fn safe(x: &mut i32, y: &mut i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC - | -LL | fn safe(x: &mut i32, y: &mut i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut1.rs:LL:CC - | -LL | safe_raw(xraw, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr index 5c574f13ff70a..c050dbb792b51 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn safe(x: &i32, y: &mut i32) { | ^ -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC - | -LL | fn safe(x: &i32, y: &mut i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC - | -LL | safe_raw(xshr, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr index 639a4ef57efeb..77597e4aa8313 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut2.tree.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | let _v = *x; | ^^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC - | -LL | fn safe(x: &i32, y: &mut i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut2.rs:LL:CC - | -LL | safe_raw(xshr, xraw); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr index 4be06c65f1912..49087d4722550 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.stack.stderr @@ -16,16 +16,11 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique function-ent | LL | safe_raw(xraw, xshr); | ^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC - | -LL | fn safe(x: &mut i32, y: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC - | -LL | safe_raw(xraw, xshr); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr index 09a54f8199c7f..32f980da6f7ed 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut3.tree.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | fn safe(x: &mut i32, y: &i32) { | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC - | -LL | fn safe(x: &mut i32, y: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut3.rs:LL:CC - | -LL | safe_raw(xraw, xshr); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr index e72996d43d7b3..f56270f48bea2 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn safe(x: &i32, y: &mut Cell) { | ^ -note: error occurred inside `safe` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | fn safe(x: &i32, y: &mut Cell) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | safe_raw(xshr, xraw as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC + 1: main + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr index d2a533a3da8e4..11eb1ae7ddeec 100644 --- a/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/aliasing_mut4.tree.stderr @@ -19,23 +19,17 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn safe(x: &i32, y: &mut Cell) { | ^ -note: error occurred inside `std::mem::replace::` - --> RUSTLIB/core/src/mem/mod.rs:LL:CC - | -LL | pub const fn replace(dest: &mut T, src: T) -> T { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::cell::Cell::::replace` (at RUSTLIB/core/src/cell.rs:LL:CC) - = note: which got called inside `std::cell::Cell::::set` (at RUSTLIB/core/src/cell.rs:LL:CC) -note: which got called inside `safe` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | y.set(1); - | ^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/aliasing_mut4.rs:LL:CC - | -LL | safe_raw(xshr, xraw as *mut _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::mem::replace + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 1: std::cell::Cell::replace + at RUSTLIB/core/src/cell.rs:LL:CC + 2: std::cell::Cell::set + at RUSTLIB/core/src/cell.rs:LL:CC + 3: safe + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC + 4: main + at tests/fail/both_borrows/aliasing_mut4.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr index c9341ccdb0371..69f7c908119ff 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.stack.stderr @@ -16,21 +16,13 @@ help: was later invalidated at offsets [0x0..0x4] by a write access | LL | *our = 5; | ^^^^^^^^ -note: error occurred inside `unknown_code_2` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | fn unknown_code_2() { - | ^^^^^^^^^^^^^^^^^^^ -note: which got called inside `demo_box_advanced_unique` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | demo_box_advanced_unique(Box::new(0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 1: demo_box_advanced_unique + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr index 446d283694a12..b4def1008f7d3 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr @@ -18,21 +18,13 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions -note: error occurred inside `unknown_code_2` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | fn unknown_code_2() { - | ^^^^^^^^^^^^^^^^^^^ -note: which got called inside `demo_box_advanced_unique` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC - | -LL | demo_box_advanced_unique(Box::new(0)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 1: demo_box_advanced_unique + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/box_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr index 1a5662b746937..7bf29bfdcb587 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { | ^^^^^ -note: error occurred inside `test` - --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC - | -LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC - | -LL | test(Box::from_raw(ptr), ptr); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + 1: main + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr index 6ec056828fd53..0744b0e9499bc 100644 --- a/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/box_noalias_violation.tree.stderr @@ -25,16 +25,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | *x = 5; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `test` - --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC - | -LL | unsafe fn test(mut x: Box, y: *const i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/box_noalias_violation.rs:LL:CC - | -LL | test(Box::from_raw(ptr), ptr); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC + 1: main + at tests/fail/both_borrows/box_noalias_violation.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr index 2b0d5f07994c4..ef7d54b0b19d9 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.stack.stderr @@ -22,16 +22,11 @@ help: was later invalidated at offsets [0x0..0x10] by a Unique retag | LL | from_raw_parts_mut(ptr.offset(mid as isize), len - mid), | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `safe::split_at_mut::` - --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC - | -LL | pub fn split_at_mut(self_: &mut [T], mid: usize) -> (&mut [T], &mut [T]) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC - | -LL | let (a, b) = safe::split_at_mut(&mut array, 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: safe::split_at_mut + at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC + 1: main + at tests/fail/both_borrows/buggy_split_at_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr index 3c09bec03d6a7..21d1504b03b15 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write6.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { | ^ -note: error occurred inside `foo` - --> tests/fail/both_borrows/illegal_write6.rs:LL:CC - | -LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/illegal_write6.rs:LL:CC - | -LL | foo(x, p); - | ^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/illegal_write6.rs:LL:CC + 1: main + at tests/fail/both_borrows/illegal_write6.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr index 69bb914236dab..923dd33a0a17d 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write6.tree.stderr @@ -25,16 +25,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | *a = 1; | ^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `foo` - --> tests/fail/both_borrows/illegal_write6.rs:LL:CC - | -LL | fn foo(a: &mut u32, y: *mut u32) -> u32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/illegal_write6.rs:LL:CC - | -LL | foo(x, p); - | ^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/illegal_write6.rs:LL:CC + 1: main + at tests/fail/both_borrows/illegal_write6.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr index d298d511d3e1a..12de173519ace 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ -note: error occurred inside `inner` - --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC - | -LL | fn inner(x: *mut i32, _y: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC - | -LL | inner(xraw, xref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr index b83217bce7e9e..26882ae08024b 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector2.tree.stderr @@ -19,16 +19,11 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ -note: error occurred inside `inner` - --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC - | -LL | fn inner(x: *mut i32, _y: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC - | -LL | inner(xraw, xref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr index ebbc3a7ae8c0e..b1215852a35f9 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.stack.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ -note: error occurred inside `inner` - --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC - | -LL | fn inner(x: *mut i32, _y: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC - | -LL | inner(ptr, &*ptr); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr index 1a1eb89d25f70..ae2dc93fd109b 100644 --- a/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/invalidate_against_protector3.tree.stderr @@ -19,16 +19,11 @@ help: the protected tag was created here, in the initial state Frozen | LL | fn inner(x: *mut i32, _y: &i32) { | ^^ -note: error occurred inside `inner` - --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC - | -LL | fn inner(x: *mut i32, _y: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC - | -LL | inner(ptr, &*ptr); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC + 1: main + at tests/fail/both_borrows/invalidate_against_protector3.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr index 2b2e16d1ecff4..14a4065c1f0a5 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.stack.stderr @@ -11,17 +11,13 @@ help: ALLOC was allocated here: | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ -note: error occurred inside `std::boxed::Box::::from_raw_in` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC - | -LL | drop(Box::from_raw(ptr as *mut u32)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr index 2b2e16d1ecff4..14a4065c1f0a5 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-1.tree.stderr @@ -11,17 +11,13 @@ help: ALLOC was allocated here: | LL | let ptr = Box::into_raw(Box::new(0u16)); | ^^^^^^^^^^^^^^ -note: error occurred inside `std::boxed::Box::::from_raw_in` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC - | -LL | drop(Box::from_raw(ptr as *mut u32)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr index f33b6cf77e4d3..beb712388f91f 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.stack.stderr @@ -6,13 +6,13 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `std::boxed::Box::::from_raw_in` - = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC - | -LL | drop(Box::from_raw(ptr.as_ptr())); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr index f33b6cf77e4d3..beb712388f91f 100644 --- a/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/issue-miri-1050-2.tree.stderr @@ -6,13 +6,13 @@ LL | Box(unsafe { Unique::new_unchecked(raw) }, alloc) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `std::boxed::Box::::from_raw_in` - = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC - | -LL | drop(Box::from_raw(ptr.as_ptr())); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main + at tests/fail/both_borrows/issue-miri-1050-2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr index 290f50f60c2b5..772e7c03bf6e2 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.stack.stderr @@ -16,21 +16,13 @@ help: was later invalidated at offsets [0x0..0x4] by a write access | LL | *our = 5; | ^^^^^^^^ -note: error occurred inside `unknown_code_2` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | fn unknown_code_2() { - | ^^^^^^^^^^^^^^^^^^^ -note: which got called inside `demo_mut_advanced_unique` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | demo_mut_advanced_unique(&mut 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 1: demo_mut_advanced_unique + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr index 608e41341c3f2..97400d479d325 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation1.tree.stderr @@ -18,21 +18,13 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *our = 5; | ^^^^^^^^ = help: this transition corresponds to a loss of read permissions -note: error occurred inside `unknown_code_2` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | fn unknown_code_2() { - | ^^^^^^^^^^^^^^^^^^^ -note: which got called inside `demo_mut_advanced_unique` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | unknown_code_2(); - | ^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC - | -LL | demo_mut_advanced_unique(&mut 0); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code_2 + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 1: demo_mut_advanced_unique + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/mut_exclusive_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr index 68fd20ba942a9..d7688680e7da2 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.stack.stderr @@ -16,30 +16,17 @@ help: is this argument | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ -note: error occurred inside `std::boxed::Box::::from_raw_in` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside closure - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | || drop(Box::from_raw(ptr)), - | ^^^^^^^^^^^^^^^^^^ -note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr, 0), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main::{closure#0} + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 3: dealloc_while_running + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 4: main + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr index f0dffb8f14adf..68b9d1c86d1a8 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_pair_retagging.tree.stderr @@ -25,31 +25,19 @@ help: the protected tag later transitioned to Reserved (conflicted) due to LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred inside ` as std::ops::Drop>::drop` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | fn drop(&mut self) { - | ^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | || drop(Box::from_raw(ptr)), - | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC}>` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr, 0), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 4: dealloc_while_running + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC + 5: main + at tests/fail/both_borrows/newtype_pair_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr index 8f1619bda4034..b7b0f28126698 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.stack.stderr @@ -16,30 +16,17 @@ help: is this argument | LL | fn dealloc_while_running(_n: Newtype<'_>, dealloc: impl FnOnce()) { | ^^ -note: error occurred inside `std::boxed::Box::::from_raw_in` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | pub unsafe fn from_raw_in(raw: *mut T, alloc: A) -> Self { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::boxed::Box::::from_raw` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside closure - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | || drop(Box::from_raw(ptr)), - | ^^^^^^^^^^^^^^^^^^ -note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: std::boxed::Box::from_raw_in + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::boxed::Box::from_raw + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: main::{closure#0} + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 3: dealloc_while_running + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 4: main + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr index f7a2d63dc8a93..5069b1d01cd2b 100644 --- a/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/newtype_retagging.tree.stderr @@ -25,31 +25,19 @@ help: the protected tag later transitioned to Reserved (conflicted) due to LL | || drop(Box::from_raw(ptr)), | ^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred inside ` as std::ops::Drop>::drop` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | fn drop(&mut self) { - | ^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | || drop(Box::from_raw(ptr)), - | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `dealloc_while_running::<{closure@tests/fail/both_borrows/newtype_retagging.rs:LL:CC}>` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | dealloc(); - | ^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/newtype_retagging.rs:LL:CC - | -LL | / dealloc_while_running( -LL | | Newtype(&mut *ptr), -LL | | || drop(Box::from_raw(ptr)), -LL | | ) - | |_________^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 4: dealloc_while_running + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC + 5: main + at tests/fail/both_borrows/newtype_retagging.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr index d1dbdbc67f1bb..f0d98ee6f20f7 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.stack.stderr @@ -14,17 +14,13 @@ LL | let _r = &mut *p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information -note: error occurred on thread `unnamed-ID`, inside `thread_2` - --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC - | -LL | fn thread_2(p: SendPtr) { - | ^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside closure - --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC - | -LL | let t2 = std::thread::spawn(move || thread_2(p)); - | ^^^^^^^^^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: thread_2 + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + 1: main::{closure#1} + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr index 47abf74cb8a29..bf8b2f8690fe5 100644 --- a/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/retag_data_race_write.tree.stderr @@ -14,17 +14,13 @@ LL | let _r = &mut *p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information -note: error occurred on thread `unnamed-ID`, inside `thread_2` - --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC - | -LL | fn thread_2(p: SendPtr) { - | ^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside closure - --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC - | -LL | let t2 = std::thread::spawn(move || thread_2(p)); - | ^^^^^^^^^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: thread_2 + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC + 1: main::{closure#1} + at tests/fail/both_borrows/retag_data_race_write.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail/both_borrows/retag_data_race_write.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr index ff99688028098..8ca0cd4bda430 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.stack.stderr @@ -16,16 +16,11 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ -note: error occurred inside `foo` - --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> &i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC - | -LL | foo(&mut (1, 2)); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr index 598a95dd96c9b..0147769bb9496 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr.tree.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions -note: error occurred inside `foo` - --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> &i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/return_invalid_shr.rs:LL:CC - | -LL | foo(&mut (1, 2)); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr index d337823011804..94d538072ae07 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.stack.stderr @@ -19,16 +19,11 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ -note: error occurred inside `foo` - --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> Option<&i32> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC - | -LL | match foo(&mut (1, 2)) { - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr index d303cc9b22e87..f66798c435864 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_option.tree.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions -note: error occurred inside `foo` - --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> Option<&i32> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC - | -LL | match foo(&mut (1, 2)) { - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr index d6063168d33d4..ffe673e1bcf9b 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.stack.stderr @@ -19,16 +19,11 @@ help: was later invalidated at offsets [0x4..0x8] by a write access | LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ -note: error occurred inside `foo` - --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> (&i32,) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC - | -LL | foo(&mut (1, 2)).0; - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr index 0c5b05ce1b94a..1eee9ed338ec0 100644 --- a/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/return_invalid_shr_tuple.tree.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | unsafe { *xraw = (42, 23) }; // unfreeze | ^^^^^^^^^^^^^^^^ = help: this transition corresponds to a loss of read permissions -note: error occurred inside `foo` - --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> (&i32,) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC - | -LL | foo(&mut (1, 2)).0; - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC + 1: main + at tests/fail/both_borrows/return_invalid_shr_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr index 3a05fb151cf19..aae9f8efbe9fb 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.stack.stderr @@ -11,21 +11,13 @@ help: was created by a SharedReadOnly retag at offsets [0x0..0x4] | LL | *(x as *const i32 as *mut i32) = 7; | ^ -note: error occurred inside `unknown_code` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | fn unknown_code(x: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `foo` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | unknown_code(&*x); - | ^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | println!("{}", foo(&mut 0)); - | ^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 1: foo + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr index 8040cfa212a90..274d5becddfdf 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation1.tree.stderr @@ -12,21 +12,13 @@ help: the accessed tag was created here, in the initial state Frozen | LL | fn unknown_code(x: &i32) { | ^ -note: error occurred inside `unknown_code` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | fn unknown_code(x: &i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `foo` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | unknown_code(&*x); - | ^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC - | -LL | println!("{}", foo(&mut 0)); - | ^^^^^^^^^^^ + = note: stack backtrace: + 0: unknown_code + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 1: foo + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC + 2: main + at tests/fail/both_borrows/shr_frozen_violation1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/box-cell-alias.stderr b/src/tools/miri/tests/fail/box-cell-alias.stderr index c5ce263ff1c96..63cdc98d3054e 100644 --- a/src/tools/miri/tests/fail/box-cell-alias.stderr +++ b/src/tools/miri/tests/fail/box-cell-alias.stderr @@ -16,16 +16,11 @@ help: was later invalidated at offsets [0x0..0x1] by a Unique retag | LL | let res = helper(val, ptr); | ^^^ -note: error occurred inside `helper` - --> tests/fail/box-cell-alias.rs:LL:CC - | -LL | fn helper(val: Box>, ptr: *const Cell) -> u8 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/box-cell-alias.rs:LL:CC - | -LL | let res = helper(val, ptr); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: helper + at tests/fail/box-cell-alias.rs:LL:CC + 1: main + at tests/fail/box-cell-alias.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr b/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr index f0f145fd13662..aea878660115f 100644 --- a/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr +++ b/src/tools/miri/tests/fail/closures/uninhabited-variant.stderr @@ -6,12 +6,11 @@ LL | match r { | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside closure -note: which got called inside `main` - --> tests/fail/closures/uninhabited-variant.rs:LL:CC - | -LL | f(); - | ^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/closures/uninhabited-variant.rs:LL:CC + 1: main + at tests/fail/closures/uninhabited-variant.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs index 5afa6c71700ed..6d8bd3d3f2a43 100644 --- a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs +++ b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.rs @@ -3,6 +3,7 @@ //@normalize-stderr-test: "LL \| .*" -> "LL | $$CODE" //@normalize-stderr-test: "\| +\^+" -> "| ^" //@normalize-stderr-test: "\n *= note:.*" -> "" +//@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" // On macOS we use chekced pthread mutexes which changes the error //@normalize-stderr-test: "a thread got stuck here" -> "thread `main` got stuck here" //@normalize-stderr-test: "a thread deadlocked" -> "the evaluated program deadlocked" diff --git a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr index 258f5a823fcd8..b036141bb2678 100644 --- a/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr +++ b/src/tools/miri/tests/fail/concurrency/mutex-leak-move-deadlock.stderr @@ -4,11 +4,6 @@ error: the evaluated program deadlocked LL | $CODE | ^ thread got stuck here | -note: which got called inside `main` - --> tests/fail/concurrency/mutex-leak-move-deadlock.rs:LL:CC - | -LL | $CODE - | ^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr index 2cc3b845deba4..0c57c6894a085 100644 --- a/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr +++ b/src/tools/miri/tests/fail/coroutine-pinned-moved.stderr @@ -16,22 +16,15 @@ help: ALLOC was deallocated here: | LL | }; // *deallocate* coroutine_iterator | ^ -note: error occurred inside closure - --> tests/fail/coroutine-pinned-moved.rs:LL:CC - | -LL | static move || { - | ^^^^^^^^^^^^^^ -note: which got called inside ` as std::iter::Iterator>::next` - --> tests/fail/coroutine-pinned-moved.rs:LL:CC - | -LL | match me.resume(()) { - | ^^^^^^^^^^^^^ - = note: which got called inside `std::boxed::iter::>>::next` (at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/coroutine-pinned-moved.rs:LL:CC - | -LL | coroutine_iterator_2.next(); // and use moved value - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: firstn::{closure#0} + at tests/fail/coroutine-pinned-moved.rs:LL:CC + 1: as std::iter::Iterator>::next + at tests/fail/coroutine-pinned-moved.rs:LL:CC + 2: std::boxed::iter::next + at RUSTLIB/alloc/src/boxed/iter.rs:LL:CC + 3: main + at tests/fail/coroutine-pinned-moved.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr b/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr index e5471e094bc89..feff143cba66c 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.stderr @@ -6,12 +6,11 @@ LL | unsafe { &(*x).0 as *const i32 } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `via_ref` -note: which got called inside `main` - --> tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC - | -LL | via_ref(ptr); // this is not - | ^^^^^^^^^^^^ + = note: stack backtrace: + 0: via_ref + at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC + 1: main + at tests/fail/dangling_pointers/dangling_pointer_to_raw_pointer.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr b/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr index 93bb9603ae5b8..67b60e6bca41c 100644 --- a/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr +++ b/src/tools/miri/tests/fail/dangling_pointers/storage_dead_dangling.stderr @@ -6,12 +6,11 @@ LL | let _ref = unsafe { &mut *(LEAK as *mut i32) }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `evil` -note: which got called inside `main` - --> tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC - | -LL | evil(); - | ^^^^^^ + = note: stack backtrace: + 0: evil + at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC + 1: main + at tests/fail/dangling_pointers/storage_dead_dangling.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr index 67edbfb4658e8..ddb2edc68d489 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_read_race.stderr @@ -11,8 +11,8 @@ LL | pointer.store(Box::into_raw(Box::new_uninit()), Ordering::Relax | ^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/alloc_read_race.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr index 33c562958e204..93fe9ff5539a9 100644 --- a/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/alloc_write_race.stderr @@ -11,8 +11,8 @@ LL | .store(Box::into_raw(Box::::new_uninit()) as *mut us | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/alloc_write_race.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr index 6f0332e46fa3d..aa8a484612087 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race1.stderr @@ -11,8 +11,8 @@ LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/atomic_read_na_write_race1.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr index 13f95e85242ae..1d1dc68784d91 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_read_na_write_race2.stderr @@ -11,8 +11,8 @@ LL | atomic_ref.load(Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/atomic_read_na_write_race2.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr index 0907ed3cd0a3e..b65e4e3609e7a 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race1.stderr @@ -11,8 +11,8 @@ LL | atomic_ref.store(32, Ordering::SeqCst) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/atomic_write_na_read_race1.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr index dfc7ed0127252..444d73d46b3cf 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_read_race2.stderr @@ -11,8 +11,8 @@ LL | let _val = *(c.0 as *mut usize); | ^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/atomic_write_na_read_race2.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr index 018db8364ed0d..ca67861b47ce0 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race1.stderr @@ -11,8 +11,8 @@ LL | *(c.0 as *mut usize) = 32; | ^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/atomic_write_na_write_race1.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr index ef5521448676a..b67a2bac102dc 100644 --- a/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/atomic_write_na_write_race2.stderr @@ -11,8 +11,8 @@ LL | atomic_ref.store(64, Ordering::SeqCst); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/atomic_write_na_write_race2.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr index da13b62b1cf09..d90b8f528f3cd 100644 --- a/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr +++ b/src/tools/miri/tests/fail/data_race/dangling_thread_async_race.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dangling_thread_async_race.rs:LL:CC | LL | / ... spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr index 798c6c490b4c3..feb35ddcd34cf 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race1.stderr @@ -16,8 +16,8 @@ LL | let _val = *ptr.0; | ^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dealloc_read_race1.rs:LL:CC | LL | let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr index 4a9e6e832b8e4..f1bd657cc5a84 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race2.stderr @@ -20,8 +20,8 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ) | |_____________^ - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dealloc_read_race2.rs:LL:CC | LL | let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr index 8b8cfaf9930c0..a07dd0a1a1da0 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_read_race_stack.stderr @@ -11,8 +11,8 @@ LL | *pointer.load(Ordering::Acquire) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dealloc_read_race_stack.rs:LL:CC | LL | ... let j1 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr index 18924d7d65cea..f24830d73fb1e 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race1.stderr @@ -16,8 +16,8 @@ LL | *ptr.0 = 2; | ^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dealloc_write_race1.rs:LL:CC | LL | let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr index 2029e0632141b..a4712554a0874 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race2.stderr @@ -20,8 +20,8 @@ LL | | std::mem::size_of::(), LL | | std::mem::align_of::(), LL | | ); | |_____________^ - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dealloc_write_race2.rs:LL:CC | LL | let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr index 3ce6e6ce56615..cc23bc0f611f4 100644 --- a/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/dealloc_write_race_stack.stderr @@ -11,8 +11,8 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/dealloc_write_race_stack.rs:LL:CC | LL | ... let j1 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr index f9a18008ab75e..1cbca79e04a81 100644 --- a/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr +++ b/src/tools/miri/tests/fail/data_race/enable_after_join_to_main.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/enable_after_join_to_main.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr index 6caeacfb5e257..7f97fc775ca98 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_alloc_race.stderr @@ -11,8 +11,8 @@ LL | StorageLive(val); | ^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/local_variable_alloc_race.rs:LL:CC | LL | / std::thread::spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr index 5dfa6917e3bac..e9173feb61ddd 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_read_race.stderr @@ -11,8 +11,8 @@ LL | let _val = val; | ^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/local_variable_read_race.rs:LL:CC | LL | let t1 = std::thread::spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr index 2f9e22f66fff6..859ade5fb65db 100644 --- a/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/local_variable_write_race.stderr @@ -11,8 +11,8 @@ LL | let mut val: u8 = 0; | ^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/local_variable_write_race.rs:LL:CC | LL | let t1 = std::thread::spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr index 10b5539a5b8cc..b74351a5f2960 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_first_load.stderr @@ -13,8 +13,8 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr index 8e37e6161c31c..be78189a695d8 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_read_write.match_second_load.stderr @@ -13,8 +13,8 @@ LL | a16.load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_read_read_write.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr index ec86c41cd1602..736509cd3a9e0 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.read_write.stderr @@ -13,8 +13,8 @@ LL | a8[0].load(Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr index d4d03b96a3e50..f4aa4cbd933f2 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write.write_read.stderr @@ -13,8 +13,8 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_read_write.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr index 98565708f881e..10356419dc1e4 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_read_write_read.stderr @@ -19,8 +19,8 @@ LL | | ); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_read_write_read.rs:LL:CC | LL | / ... s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr index 9033bc2c922d5..6c5ac0ca21189 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.fst.stderr @@ -13,8 +13,8 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr index b0e771c40b913..7e7461a7a4f6f 100644 --- a/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr +++ b/src/tools/miri/tests/fail/data_race/mixed_size_write_write.snd.stderr @@ -13,8 +13,8 @@ LL | a16.store(1, Ordering::SeqCst); = help: see https://doc.rust-lang.org/nightly/std/sync/atomic/index.html#memory-model-for-atomic-accesses for more information about the Rust memory model = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/mixed_size_write_write.rs:LL:CC | LL | / s.spawn(|| { diff --git a/src/tools/miri/tests/fail/data_race/read_write_race.stderr b/src/tools/miri/tests/fail/data_race/read_write_race.stderr index 1922ce949f6b4..f0eae9841bee5 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race.stderr @@ -11,8 +11,8 @@ LL | let _val = *c.0; | ^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/read_write_race.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr index a6bdac409d9da..703a025087276 100644 --- a/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/read_write_race_stack.stderr @@ -11,8 +11,8 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/read_write_race_stack.rs:LL:CC | LL | ... let j1 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr index 6c77bf6b3d8bd..1fb793912b72a 100644 --- a/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr +++ b/src/tools/miri/tests/fail/data_race/relax_acquire_race.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/relax_acquire_race.rs:LL:CC | LL | ... let j3 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr index 528db7ed24799..8f01b7cdad51a 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/release_seq_race.rs:LL:CC | LL | let j3 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr index 1b2daf8b256b4..a7fdf8e219f51 100644 --- a/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr +++ b/src/tools/miri/tests/fail/data_race/release_seq_race_same_thread.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/release_seq_race_same_thread.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/rmw_race.stderr b/src/tools/miri/tests/fail/data_race/rmw_race.stderr index 21f710e16b0da..8bbd9929517e6 100644 --- a/src/tools/miri/tests/fail/data_race/rmw_race.stderr +++ b/src/tools/miri/tests/fail/data_race/rmw_race.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 1; | ^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/rmw_race.rs:LL:CC | LL | ... let j3 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/write_write_race.stderr b/src/tools/miri/tests/fail/data_race/write_write_race.stderr index 112cdb278196b..33352a5ded586 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race.stderr @@ -11,8 +11,8 @@ LL | *c.0 = 32; | ^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/write_write_race.rs:LL:CC | LL | ... let j2 = spawn(move || { diff --git a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr index c70dbb4e619f7..a439be8590159 100644 --- a/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr +++ b/src/tools/miri/tests/fail/data_race/write_write_race_stack.stderr @@ -11,8 +11,8 @@ LL | *pointer.load(Ordering::Acquire) = 3; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/data_race/write_write_race_stack.rs:LL:CC | LL | let j1 = spawn(move || { diff --git a/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr b/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr index 068d4b4f13292..a9a8deb05aae1 100644 --- a/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr +++ b/src/tools/miri/tests/fail/enum-set-discriminant-niche-variant-wrong.stderr @@ -6,12 +6,11 @@ LL | SetDiscriminant(*ptr, 1); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `set_discriminant` -note: which got called inside `main` - --> tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC - | -LL | set_discriminant(&mut v); - | ^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: set_discriminant + at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC + 1: main + at tests/fail/enum-set-discriminant-niche-variant-wrong.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr index f45f5c26bacbd..952f2272f3bf6 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.stack.stderr @@ -21,16 +21,11 @@ help: is this argument | LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `callee` - --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC - | -LL | fn callee(x: S, ptr: *mut S) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC - | -LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: callee + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr index 044026ee8ddc5..095dc7e1a1fb5 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_mutate.tree.stderr @@ -30,16 +30,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(S(0)) }; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `callee` - --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC - | -LL | fn callee(x: S, ptr: *mut S) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC - | -LL | Call(_unit = callee(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: callee + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_mutate.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr index b66d13cede1f4..22077345243fd 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.none.stderr @@ -6,12 +6,11 @@ LL | unsafe { ptr.read() }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `change_arg` -note: which got called inside `main` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: change_arg + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC Uninitialized memory occurred at ALLOC[0x0..0x4], in this allocation: ALLOC (stack variable, size: 4, align: 4) { diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr index 9dc9adc13ae32..d625d1d1d034c 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.stack.stderr @@ -21,16 +21,11 @@ help: is this argument | LL | x.0 = 0; | ^^^^^^^ -note: error occurred inside `change_arg` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | fn change_arg(mut x: S, ptr: *mut S) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: change_arg + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr index 0a6c6e615a163..a01c040fe6f81 100644 --- a/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/arg_inplace_observe_during.tree.stderr @@ -30,16 +30,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | x.0 = 0; | ^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `change_arg` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | fn change_arg(mut x: S, ptr: *mut S) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC - | -LL | Call(_unit = change_arg(Move(*ptr), ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: change_arg + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC + 1: main + at tests/fail/function_calls/arg_inplace_observe_during.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr index dd7f52d03f20f..3c71934ac63ea 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.both.stderr @@ -14,24 +14,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) -note: which got called inside `nounwind` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | / extern "C-unwind" fn nounwind() { -LL | | panic!(); -LL | | } - | |_^ -note: which got called inside `main` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | unsafe { nounwind() } - | ^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr index dd7f52d03f20f..3c71934ac63ea 100644 --- a/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr +++ b/src/tools/miri/tests/fail/function_calls/exported_symbol_bad_unwind2.definition.stderr @@ -14,24 +14,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) -note: which got called inside `nounwind` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | / extern "C-unwind" fn nounwind() { -LL | | panic!(); -LL | | } - | |_^ -note: which got called inside `main` - --> tests/fail/function_calls/exported_symbol_bad_unwind2.rs:LL:CC - | -LL | unsafe { nounwind() } - | ^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr index 32e80ed0e61ed..016849a6a336a 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.none.stderr @@ -6,12 +6,11 @@ LL | unsafe { ptr.read() }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `myfun` -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC Uninitialized memory occurred at ALLOC[0x0..0x4], in this allocation: ALLOC (stack variable, size: 4, align: 4) { diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr index 14c8e5cb89606..73c562c94e951 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr @@ -21,16 +21,11 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `myfun` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | fn myfun(ptr: *mut i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr index 2e5b687f90ac8..0dc137843c91c 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_read.tree.stderr @@ -30,16 +30,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.read() }; | ^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `myfun` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | fn myfun(ptr: *mut i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_read.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr index 63dee06563d1d..6654ddc12c29b 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr @@ -21,16 +21,11 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `myfun` - --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC - | -LL | fn myfun(ptr: *mut i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr index 80c111d4ddb4e..6472dfd4f995a 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write.tree.stderr @@ -30,16 +30,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `myfun` - --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC - | -LL | fn myfun(ptr: *mut i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr index a6129451530ac..79f4d2c69f3c2 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.stack.stderr @@ -21,16 +21,11 @@ help: was later invalidated at offsets [0x0..0x4] by a Unique in-place fun | LL | become myfun2(ptr) | ^^^^^^^^^^^^^^^^^^ -note: error occurred inside `myfun2` - --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC - | -LL | fn myfun2(ptr: *mut i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun2 + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr index a6fff1c266831..82b898df45b2e 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing_write_tail_call.tree.stderr @@ -30,16 +30,11 @@ help: the protected tag later transitioned to Unique due to a child write LL | unsafe { ptr.write(0) }; | ^^^^^^^^^^^^^^^^^^^^^^^ = help: this transition corresponds to the first write to a 2-phase borrowed mutable reference -note: error occurred inside `myfun2` - --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC - | -LL | fn myfun2(ptr: *mut i32) -> i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC - | -LL | Call(_x = myfun(ptr), ReturnTo(after_call), UnwindContinue()) - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: myfun2 + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC + 1: main + at tests/fail/function_calls/return_pointer_aliasing_write_tail_call.rs:LL:CC = note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr b/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr index ef6decaece355..db7fb1a68790a 100644 --- a/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr +++ b/src/tools/miri/tests/fail/function_calls/simd_feature_flag_difference.stderr @@ -6,12 +6,11 @@ LL | unsafe { foo(0.0, x) } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `bar` -note: which got called inside `main` - --> tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC - | -LL | let copy = bar(input); - | ^^^^^^^^^^ + = note: stack backtrace: + 0: bar + at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC + 1: main + at tests/fail/function_calls/simd_feature_flag_difference.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr index 697e35a660caa..249eba76c83da 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_data.stderr @@ -6,12 +6,11 @@ LL | RET = PtrMetadata(*p); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `deref_meta` -note: which got called inside `main` - --> tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC - | -LL | let _meta = deref_meta(p.as_ptr().cast()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref_meta + at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC + 1: main + at tests/fail/intrinsics/ptr_metadata_uninit_slice_data.rs:LL:CC Uninitialized memory occurred at ALLOC[0xX..0xY], in this allocation: ALLOC DUMP diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr index ba711710b41eb..371802a7bcf27 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_slice_len.stderr @@ -18,12 +18,11 @@ LL | RET = PtrMetadata(*p); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `deref_meta` -note: which got called inside `main` - --> tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC - | -LL | let _meta = deref_meta(p.as_ptr().cast()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref_meta + at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC + 1: main + at tests/fail/intrinsics/ptr_metadata_uninit_slice_len.rs:LL:CC Uninitialized memory occurred at ALLOC[0xX..0xY], in this allocation: ALLOC DUMP diff --git a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr index 104e281f2a8e5..207e7983aab46 100644 --- a/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr +++ b/src/tools/miri/tests/fail/intrinsics/ptr_metadata_uninit_thin.stderr @@ -6,12 +6,11 @@ LL | RET = PtrMetadata(*p); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `deref_meta` -note: which got called inside `main` - --> tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC - | -LL | let _meta = deref_meta(p.as_ptr()); - | ^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref_meta + at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC + 1: main + at tests/fail/intrinsics/ptr_metadata_uninit_thin.rs:LL:CC Uninitialized memory occurred at ALLOC[0xX..0xY], in this allocation: ALLOC DUMP diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr index 619925f28968f..6cdcd114d5cf7 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-array.stderr @@ -6,12 +6,11 @@ LL | typed_swap_nonoverlapping(a, b); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `invalid_array` -note: which got called inside `main` - --> tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC - | -LL | invalid_array(); - | ^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: invalid_array + at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC + 1: main + at tests/fail/intrinsics/typed-swap-invalid-array.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr index 42bea7dd5e34b..223f7430b60a9 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.left.stderr @@ -6,12 +6,11 @@ LL | typed_swap_nonoverlapping(a, b); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `invalid_scalar` -note: which got called inside `main` - --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC - | -LL | invalid_scalar(); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: invalid_scalar + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC + 1: main + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr index 13e8c7f9c5aef..59e3920850014 100644 --- a/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr +++ b/src/tools/miri/tests/fail/intrinsics/typed-swap-invalid-scalar.right.stderr @@ -6,12 +6,11 @@ LL | typed_swap_nonoverlapping(a, b); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `invalid_scalar` -note: which got called inside `main` - --> tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC - | -LL | invalid_scalar(); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: invalid_scalar + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC + 1: main + at tests/fail/intrinsics/typed-swap-invalid-scalar.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/issue-miri-1112.stderr b/src/tools/miri/tests/fail/issue-miri-1112.stderr index 0fc67c6d4fd9f..0c5c6a94baf2d 100644 --- a/src/tools/miri/tests/fail/issue-miri-1112.stderr +++ b/src/tools/miri/tests/fail/issue-miri-1112.stderr @@ -6,12 +6,11 @@ LL | let obj = std::mem::transmute::(obj) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `FunnyPointer::from_data_ptr` -note: which got called inside `main` - --> tests/fail/issue-miri-1112.rs:LL:CC - | -LL | let _raw: &FunnyPointer = FunnyPointer::from_data_ptr(&hello, &meta as *const _); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: FunnyPointer::from_data_ptr + at tests/fail/issue-miri-1112.rs:LL:CC + 1: main + at tests/fail/issue-miri-1112.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/memleak_rc.stderr b/src/tools/miri/tests/fail/memleak_rc.stderr index f7b0950ef6ced..91097a99117f2 100644 --- a/src/tools/miri/tests/fail/memleak_rc.stderr +++ b/src/tools/miri/tests/fail/memleak_rc.stderr @@ -4,12 +4,11 @@ error: memory leaked: ALLOC (Rust heap, SIZE, ALIGN), allocated here: LL | Box::leak(Box::new(RcInner { strong: Cell::new(1), weak: Cell::new(1), value })) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: this is inside `std::rc::Rc::>>::new` -note: which got called inside `main` - --> tests/fail/memleak_rc.rs:LL:CC - | -LL | let x = Dummy(Rc::new(RefCell::new(None))); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rc::Rc::new + at RUSTLIB/alloc/src/rc.rs:LL:CC + 1: main + at tests/fail/memleak_rc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/never_transmute_void.rs b/src/tools/miri/tests/fail/never_transmute_void.rs index ad67b4446165c..a2db2ca9db61b 100644 --- a/src/tools/miri/tests/fail/never_transmute_void.rs +++ b/src/tools/miri/tests/fail/never_transmute_void.rs @@ -1,6 +1,5 @@ // This should fail even without validation //@compile-flags: -Zmiri-disable-validation -//@require-annotations-for-level: ERROR #![feature(never_type)] #![allow(unused, invalid_value)] @@ -18,5 +17,4 @@ mod m { fn main() { let v = unsafe { std::mem::transmute::<(), m::Void>(()) }; m::f(v); - //~^ NOTE: inside `main` } diff --git a/src/tools/miri/tests/fail/never_transmute_void.stderr b/src/tools/miri/tests/fail/never_transmute_void.stderr index a236d17c49dd3..ce65be6ef1b49 100644 --- a/src/tools/miri/tests/fail/never_transmute_void.stderr +++ b/src/tools/miri/tests/fail/never_transmute_void.stderr @@ -6,12 +6,11 @@ LL | match v.0 {} | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `m::f` -note: which got called inside `main` - --> tests/fail/never_transmute_void.rs:LL:CC - | -LL | m::f(v); - | ^^^^^^^ + = note: stack backtrace: + 0: m::f + at tests/fail/never_transmute_void.rs:LL:CC + 1: main + at tests/fail/never_transmute_void.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/overlapping_assignment.stderr b/src/tools/miri/tests/fail/overlapping_assignment.stderr index 6bf7fa4465980..43e767e975559 100644 --- a/src/tools/miri/tests/fail/overlapping_assignment.stderr +++ b/src/tools/miri/tests/fail/overlapping_assignment.stderr @@ -6,12 +6,11 @@ LL | *ptr1 = *ptr2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `self_copy` -note: which got called inside `main` - --> tests/fail/overlapping_assignment.rs:LL:CC - | -LL | self_copy(ptr, ptr); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: self_copy + at tests/fail/overlapping_assignment.rs:LL:CC + 1: main + at tests/fail/overlapping_assignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/abort_unwind.stderr b/src/tools/miri/tests/fail/panic/abort_unwind.stderr index 1f45211c5ee40..d5699fc41dfe4 100644 --- a/src/tools/miri/tests/fail/panic/abort_unwind.stderr +++ b/src/tools/miri/tests/fail/panic/abort_unwind.stderr @@ -14,18 +14,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `std::panic::abort_unwind::<{closure@tests/fail/panic/abort_unwind.rs:LL:CC}, ()>` (at RUSTLIB/core/src/panic.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/abort_unwind.rs:LL:CC - | -LL | std::panic::abort_unwind(|| panic!("PANIC!!!")); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/bad_unwind.stderr b/src/tools/miri/tests/fail/panic/bad_unwind.stderr index 06e019bb6978b..d47f7b5b10c1f 100644 --- a/src/tools/miri/tests/fail/panic/bad_unwind.stderr +++ b/src/tools/miri/tests/fail/panic/bad_unwind.stderr @@ -11,15 +11,17 @@ LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside closure - = note: which got called inside `std::panicking::catch_unwind::do_call::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::catch_unwind::<(), {closure@tests/fail/panic/bad_unwind.rs:LL:CC}>` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panic::catch_unwind::<{closure@tests/fail/panic/bad_unwind.rs:LL:CC}, ()>` (at RUSTLIB/std/src/panic.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/bad_unwind.rs:LL:CC - | -LL | std::panic::catch_unwind(|| unwind()).unwrap_err(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/panic/bad_unwind.rs:LL:CC + 1: std::panicking::catch_unwind::do_call + at RUSTLIB/std/src/panicking.rs:LL:CC + 2: std::panicking::catch_unwind + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panic::catch_unwind + at RUSTLIB/std/src/panic.rs:LL:CC + 4: main + at tests/fail/panic/bad_unwind.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/double_panic.stderr b/src/tools/miri/tests/fail/panic/double_panic.stderr index 4beadb6aa647b..34a62a09cc3ee 100644 --- a/src/tools/miri/tests/fail/panic/double_panic.stderr +++ b/src/tools/miri/tests/fail/panic/double_panic.stderr @@ -17,20 +17,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_nounwind_nobacktrace` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_in_cleanup` (at RUSTLIB/core/src/panicking.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/double_panic.rs:LL:CC - | -LL | / fn main() { -LL | | let _foo = Foo; -LL | | panic!("first"); -LL | | } - | |_^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/no_std.stderr b/src/tools/miri/tests/fail/panic/no_std.stderr index 128dfddc215e1..87adb18a7ab90 100644 --- a/src/tools/miri/tests/fail/panic/no_std.stderr +++ b/src/tools/miri/tests/fail/panic/no_std.stderr @@ -6,12 +6,11 @@ error: abnormal termination: the program aborted execution LL | core::intrinsics::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `panic_handler` -note: which got called inside `miri_start` - --> tests/fail/panic/no_std.rs:LL:CC - | -LL | panic!("blarg I am dead") - | ^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: panic_handler + at tests/fail/panic/no_std.rs:LL:CC + 1: miri_start + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort1.stderr b/src/tools/miri/tests/fail/panic/panic_abort1.stderr index 57c8ee843b862..4135ceadc5397 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort1.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort1.stderr @@ -9,18 +9,23 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::rt::__rust_abort` - = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) - = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/panic_abort1.rs:LL:CC - | -LL | std::panic!("panicking from libstd"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort2.stderr b/src/tools/miri/tests/fail/panic/panic_abort2.stderr index 7c145634a1026..5b485604037ce 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort2.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort2.stderr @@ -9,18 +9,23 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::rt::__rust_abort` - = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) - = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/panic_abort2.rs:LL:CC - | -LL | std::panic!("{}-panicking from libstd", 42); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort3.stderr b/src/tools/miri/tests/fail/panic/panic_abort3.stderr index 71877122b6254..e4179f93f931c 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort3.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort3.stderr @@ -9,18 +9,23 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::rt::__rust_abort` - = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) - = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/panic_abort3.rs:LL:CC - | -LL | core::panic!("panicking from libcore"); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/panic_abort4.stderr b/src/tools/miri/tests/fail/panic/panic_abort4.stderr index 2b4c6bea5605f..d2e50b87068f6 100644 --- a/src/tools/miri/tests/fail/panic/panic_abort4.stderr +++ b/src/tools/miri/tests/fail/panic/panic_abort4.stderr @@ -9,18 +9,23 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::rt::__rust_abort` - = note: which got called inside `panic_abort::__rust_start_panic` (at RUSTLIB/panic_abort/src/lib.rs:LL:CC) - = note: which got called inside `std::panicking::rust_panic` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::panic_with_hook` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/panic/panic_abort4.rs:LL:CC - | -LL | core::panic!("{}-panicking from libcore", 42); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::rt::__rust_abort + at RUSTLIB/std/src/rt.rs:LL:CC + 1: panic_abort::__rust_start_panic + at RUSTLIB/panic_abort/src/lib.rs:LL:CC + 2: std::panicking::rust_panic + at RUSTLIB/std/src/panicking.rs:LL:CC + 3: std::panicking::panic_with_hook + at RUSTLIB/std/src/panicking.rs:LL:CC + 4: std::panicking::panic_handler::{closure#0} + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::sys::backtrace::__rust_end_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 6: std::panicking::panic_handler + at RUSTLIB/std/src/panicking.rs:LL:CC + 7: main + at RUSTLIB/core/src/panic.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs b/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs index 93ad42ea1cced..c25684af50902 100644 --- a/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs +++ b/src/tools/miri/tests/fail/panic/tls_macro_const_drop_panic.rs @@ -4,6 +4,7 @@ //@compile-flags: -Zmiri-backtrace=full //@normalize-stderr-test: "'main'|''" -> "$$NAME" //@normalize-stderr-test: ".*(note|-->|\|).*\n" -> "" +//@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" pub struct NoisyDrop {} diff --git a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs index a207d3923124a..32fd8318f7963 100644 --- a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs +++ b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.rs @@ -1,7 +1,8 @@ //@error-in-other-file: aborted execution // Backtraces vary wildly between platforms, we have to normalize away almost the entire thing //@normalize-stderr-test: "'main'|''" -> "$$NAME" -//@normalize-stderr-test: ".*(note|-->|:::|\|).*\n" -> "" +//@normalize-stderr-test: ".*(note|-->|\|).*\n" -> "" +//@normalize-stderr-test: "\n *\d+:.*\n *at .*" -> "" pub struct NoisyDrop {} diff --git a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr index 39263a8d61cc9..ec243f114af07 100644 --- a/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr +++ b/src/tools/miri/tests/fail/panic/tls_macro_drop_panic.stderr @@ -3,6 +3,7 @@ thread $NAME ($TID) panicked at tests/fail/panic/tls_macro_drop_panic.rs:LL:CC: ow fatal runtime error: thread local panicked on drop, aborting error: abnormal termination: the program aborted execution + ::: RUSTLIB/std/src/sys/thread_local/PLATFORM.rs:LL:CC error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr b/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr index 6af86ffdb2bd0..fc9f394a568c7 100644 --- a/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr +++ b/src/tools/miri/tests/fail/provenance/provenance_transmute.stderr @@ -6,12 +6,11 @@ LL | let _val = *left_ptr; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `deref` -note: which got called inside `main` - --> tests/fail/provenance/provenance_transmute.rs:LL:CC - | -LL | deref(ptr1, ptr2.with_addr(ptr1.addr())); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: deref + at tests/fail/provenance/provenance_transmute.rs:LL:CC + 1: main + at tests/fail/provenance/provenance_transmute.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr b/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr index 7fc54636b5524..7275be1343ac9 100644 --- a/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr +++ b/src/tools/miri/tests/fail/ptr_swap_nonoverlapping.stderr @@ -12,15 +12,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/ptr_swap_nonoverlapping.rs:LL:CC - | -LL | std::ptr::swap_nonoverlapping(ptr, ptr, 1); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/shims/ctor_ub.stderr b/src/tools/miri/tests/fail/shims/ctor_ub.stderr index ab8a8f633638d..e89f3b3c90593 100644 --- a/src/tools/miri/tests/fail/shims/ctor_ub.stderr +++ b/src/tools/miri/tests/fail/shims/ctor_ub.stderr @@ -6,8 +6,7 @@ LL | std::hint::unreachable_unchecked() | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `ctor` -note: which got called indirectly due to this code +note: the current function got called indirectly due to this code --> tests/fail/shims/ctor_ub.rs:LL:CC | LL | static $ident: unsafe extern "C" fn() = $ctor; diff --git a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr index eb7f70a351ad9..af55ccfe5e679 100644 --- a/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr +++ b/src/tools/miri/tests/fail/shims/fs/isolated_file.stderr @@ -6,22 +6,31 @@ LL | let fd = cvt_r(|| unsafe { open64(path.as_ptr(), flags, opts.mode a | = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning - = note: this is inside closure - = note: which got called inside `std::sys::pal::PLATFORM::cvt_r::` (at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC) - = note: which got called inside `std::sys::fs::PLATFORM::File::open_c` (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) - = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) - = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_with_cstr::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) - = note: which got called inside `std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr::` (at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC) - = note: which got called inside `std::sys::fs::PLATFORM::File::open` (at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC) - = note: which got called inside `std::fs::OpenOptions::_open` (at RUSTLIB/std/src/fs.rs:LL:CC) - = note: which got called inside `std::fs::OpenOptions::open::<&std::path::Path>` (at RUSTLIB/std/src/fs.rs:LL:CC) - = note: which got called inside `std::fs::File::open::<&str>` (at RUSTLIB/std/src/fs.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/shims/fs/isolated_file.rs:LL:CC - | -LL | let _file = std::fs::File::open("file.txt").unwrap(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::sys::fs::PLATFORM::File::open_c::{closure#0} + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 1: std::sys::pal::PLATFORM::cvt_r + at RUSTLIB/std/src/sys/pal/PLATFORM/mod.rs:LL:CC + 2: std::sys::fs::PLATFORM::File::open_c + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 3: std::sys::fs::PLATFORM::File::open::{closure#0} + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 4: std::sys::pal::PLATFORM::small_c_string::run_with_cstr_stack + at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + 5: std::sys::pal::PLATFORM::small_c_string::run_with_cstr + at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + 6: std::sys::pal::PLATFORM::small_c_string::run_path_with_cstr + at RUSTLIB/std/src/sys/pal/PLATFORM/small_c_string.rs:LL:CC + 7: std::sys::fs::PLATFORM::File::open + at RUSTLIB/std/src/sys/fs/PLATFORM.rs:LL:CC + 8: std::fs::OpenOptions::_open + at RUSTLIB/std/src/fs.rs:LL:CC + 9: std::fs::OpenOptions::open + at RUSTLIB/std/src/fs.rs:LL:CC + 10: std::fs::File::open + at RUSTLIB/std/src/fs.rs:LL:CC + 11: main + at tests/fail/shims/fs/isolated_file.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/shims/isolated_stdin.stderr b/src/tools/miri/tests/fail/shims/isolated_stdin.stderr index 58f0957a668cc..c478f1412bbf7 100644 --- a/src/tools/miri/tests/fail/shims/isolated_stdin.stderr +++ b/src/tools/miri/tests/fail/shims/isolated_stdin.stderr @@ -5,10 +5,6 @@ error: unsupported operation: `read` from stdin not available when isolation is | = help: set `MIRIFLAGS=-Zmiri-disable-isolation` to disable isolation; = help: or set `MIRIFLAGS=-Zmiri-isolation-error=warn` to make Miri return an error code from isolated operations (if supported for that operation) and continue with a warning -note: which got called inside `main` - --> tests/fail/shims/isolated_stdin.rs:LL:CC - | - | ^ note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr b/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr index 84051e688aabd..266f9247b98d7 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/deallocate_against_protector1.stderr @@ -6,28 +6,21 @@ LL | self.1.deallocate(From::from(ptr.cast()), layout); | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information - = note: this is inside ` as std::ops::Drop>::drop` - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC - | -LL | drop(unsafe { Box::from_raw(raw) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `<{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) -note: which got called inside `inner` - --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC - | -LL | f(x) - | ^^^^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC - | -LL | / inner(Box::leak(Box::new(0)), |x| { -LL | | let raw = x as *mut _; -LL | | drop(unsafe { Box::from_raw(raw) }); -LL | | }); - | |______^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC + 4: <{closure@tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC} as std::ops::FnOnce<(&mut i32,)>>::call_once - shim + at RUSTLIB/core/src/ops/function.rs:LL:CC + 5: inner + at tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC + 6: main + at tests/fail/stacked_borrows/deallocate_against_protector1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr index 7f4899bb0d6f8..027fe239319a3 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_protector.stderr @@ -16,18 +16,15 @@ help: is this argument | LL | core::ptr::drop_in_place(x); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `::drop` - --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC - | -LL | fn drop(&mut self) { - | ^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::ptr::drop_in_place:: - shim(Some(HasDrop))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::ptr::drop_in_place::<(HasDrop, u8)> - shim(Some((HasDrop, u8)))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC - | -LL | core::ptr::drop_in_place(x); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: ::drop + at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC + 1: std::ptr::drop_in_place - shim(Some(HasDrop)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::ptr::drop_in_place - shim(Some((HasDrop, u8))) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 3: main + at tests/fail/stacked_borrows/drop_in_place_protector.rs:LL:CC = note: this error originates in the macro `core::ptr::addr_of_mut` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr index 11b3e49b852e6..cffa175569506 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/drop_in_place_retag.stderr @@ -13,18 +13,11 @@ help: was created by a SharedReadOnly retag at offsets [0x0..0x1] | LL | let x = core::ptr::addr_of!(x); | ^^^^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `std::ptr::drop_in_place:: - shim(None)` - --> RUSTLIB/core/src/ptr/mod.rs:LL:CC - | -LL | / pub const unsafe fn drop_in_place(to_drop: *mut T) -LL | | where -LL | | T: [const] Destruct, - | |________________________^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC - | -LL | core::ptr::drop_in_place(x.cast_mut()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::ptr::drop_in_place - shim(None) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/drop_in_place_retag.rs:LL:CC = note: this error originates in the macro `core::ptr::addr_of` (in Nightly builds, run with -Z macro-backtrace for more info) note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr b/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr index 17abcf0a46433..336dff598b420 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/invalidate_against_protector1.stderr @@ -16,16 +16,11 @@ help: is this argument | LL | fn inner(x: *mut i32, _y: &mut i32) { | ^^ -note: error occurred inside `inner` - --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC - | -LL | fn inner(x: *mut i32, _y: &mut i32) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC - | -LL | inner(xraw, xref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: inner + at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/invalidate_against_protector1.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr index a13ff30deda7a..4f6045c7c16a2 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/pointer_smuggling.stderr @@ -16,16 +16,11 @@ help: was later invalidated at offsets [0x0..0x1] by a write access | LL | *val = 2; // this invalidates any raw ptrs `fun1` might have created. | ^^^^^^^^ -note: error occurred inside `fun2` - --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC - | -LL | fn fun2() { - | ^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC - | -LL | fun2(); // if they now use a raw ptr they break our reference - | ^^^^^^ + = note: stack backtrace: + 0: fun2 + at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/pointer_smuggling.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr index f50b05712ee2f..7f112a2e85b65 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_protected_read.stderr @@ -14,8 +14,8 @@ LL | unsafe { ptr.0.read() }; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/stacked_borrows/retag_data_race_protected_read.rs:LL:CC | LL | let t = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr index 67b1cdab911a2..c162bee0a6722 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stderr @@ -14,17 +14,13 @@ LL | let _r = &*p; = help: therefore from the perspective of data races, a retag has the same implications as a read or write = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information -note: error occurred on thread `unnamed-ID`, inside `thread_2` - --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC - | -LL | fn thread_2(p: SendPtr) { - | ^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside closure - --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC - | -LL | let t2 = std::thread::spawn(move || thread_2(p)); - | ^^^^^^^^^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: thread_2 + at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC + 1: main::{closure#1} + at tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail/stacked_borrows/retag_data_race_read.rs:LL:CC | LL | let t2 = std::thread::spawn(move || thread_2(p)); diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr index 9148f5ae817cf..88dfd1ec9db92 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut.stderr @@ -16,16 +16,11 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ -note: error occurred inside `foo` - --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> &mut i32 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC - | -LL | foo(&mut (1, 2)); - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/return_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr index 6cce7f9f246ee..5ccb09c7fd844 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_option.stderr @@ -19,16 +19,11 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ -note: error occurred inside `foo` - --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> Option<&mut i32> { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC - | -LL | match foo(&mut (1, 2)) { - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/return_invalid_mut_option.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr index 37d18f122b688..eb68a637c2297 100644 --- a/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr +++ b/src/tools/miri/tests/fail/stacked_borrows/return_invalid_mut_tuple.stderr @@ -19,16 +19,11 @@ help: was later invalidated at offsets [0x0..0x8] by a read access | LL | let _val = unsafe { *xraw }; // invalidate xref | ^^^^^ -note: error occurred inside `foo` - --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC - | -LL | fn foo(x: &mut (i32, i32)) -> (&mut i32,) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC - | -LL | foo(&mut (1, 2)).0; - | ^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC + 1: main + at tests/fail/stacked_borrows/return_invalid_mut_tuple.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr b/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr index 00dd2999f540a..c7e471f570c85 100644 --- a/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr +++ b/src/tools/miri/tests/fail/tail_calls/cc-mismatch.stderr @@ -6,19 +6,33 @@ LL | extern "rust-call" fn call_once(self, args: Args) -> Self::Output; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `>::call_once - shim(fn())` - = note: which got called inside `std::sys::backtrace::__rust_begin_short_backtrace::` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/rt.rs:LL:CC) - = note: which got called inside `std::ops::function::impls:: for &dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe>::call_once` (at RUSTLIB/core/src/ops/function.rs:LL:CC) - = note: which got called inside `std::panicking::catch_unwind::do_call::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::catch_unwind:: i32 + std::marker::Sync + std::panic::RefUnwindSafe>` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panic::catch_unwind::<&dyn std::ops::Fn() -> i32 + std::marker::Sync + std::panic::RefUnwindSafe, i32>` (at RUSTLIB/std/src/panic.rs:LL:CC) - = note: which got called inside closure (at RUSTLIB/std/src/rt.rs:LL:CC) - = note: which got called inside `std::panicking::catch_unwind::do_call::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panicking::catch_unwind::` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::panic::catch_unwind::<{closure@std::rt::lang_start_internal::{closure#0}}, isize>` (at RUSTLIB/std/src/panic.rs:LL:CC) - = note: which got called inside `std::rt::lang_start_internal` (at RUSTLIB/std/src/rt.rs:LL:CC) - = note: which got called inside `std::rt::lang_start::<()>` (at RUSTLIB/std/src/rt.rs:LL:CC) + = note: stack backtrace: + 0: >::call_once - shim(fn()) + at RUSTLIB/core/src/ops/function.rs:LL:CC + 1: std::sys::backtrace::__rust_begin_short_backtrace + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + 2: std::rt::lang_start::{closure#0} + at RUSTLIB/std/src/rt.rs:LL:CC + 3: std::ops::function::impls::call_once + at RUSTLIB/core/src/ops/function.rs:LL:CC + 4: std::panicking::catch_unwind::do_call + at RUSTLIB/std/src/panicking.rs:LL:CC + 5: std::panicking::catch_unwind + at RUSTLIB/std/src/panicking.rs:LL:CC + 6: std::panic::catch_unwind + at RUSTLIB/std/src/panic.rs:LL:CC + 7: std::rt::lang_start_internal::{closure#0} + at RUSTLIB/std/src/rt.rs:LL:CC + 8: std::panicking::catch_unwind::do_call + at RUSTLIB/std/src/panicking.rs:LL:CC + 9: std::panicking::catch_unwind + at RUSTLIB/std/src/panicking.rs:LL:CC + 10: std::panic::catch_unwind + at RUSTLIB/std/src/panic.rs:LL:CC + 11: std::rt::lang_start_internal + at RUSTLIB/std/src/rt.rs:LL:CC + 12: std::rt::lang_start + at RUSTLIB/std/src/rt.rs:LL:CC error: aborting due to 1 previous error diff --git a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr index a48673fb4b23a..1577cceae5944 100644 --- a/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr +++ b/src/tools/miri/tests/fail/tail_calls/dangling-local-var.stderr @@ -16,16 +16,11 @@ help: ALLOC was deallocated here: | LL | f(std::ptr::null()); | ^^^^^^^^^^^^^^^^^^^ -note: error occurred inside `g` - --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC - | -LL | fn g(x: *const i32) { - | ^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tail_calls/dangling-local-var.rs:LL:CC - | -LL | f(std::ptr::null()); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: g + at tests/fail/tail_calls/dangling-local-var.rs:LL:CC + 1: main + at tests/fail/tail_calls/dangling-local-var.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/terminate-terminator.stderr b/src/tools/miri/tests/fail/terminate-terminator.stderr index 7d8ae128b5d66..6c38de9b03146 100644 --- a/src/tools/miri/tests/fail/terminate-terminator.stderr +++ b/src/tools/miri/tests/fail/terminate-terminator.stderr @@ -16,30 +16,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) -note: which got called inside `has_cleanup` - --> tests/fail/terminate-terminator.rs:LL:CC - | -LL | / fn has_cleanup() { -LL | | let _f = Foo; -LL | | panic!(); -LL | | } - | |_^ -note: which got called inside `panic_abort` - --> tests/fail/terminate-terminator.rs:LL:CC - | -LL | has_cleanup(); - | ^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/terminate-terminator.rs:LL:CC - | -LL | panic_abort(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tls_macro_leak.stderr b/src/tools/miri/tests/fail/tls_macro_leak.stderr index c3029bb5b4dec..3f8240f44547f 100644 --- a/src/tools/miri/tests/fail/tls_macro_leak.stderr +++ b/src/tools/miri/tests/fail/tls_macro_leak.stderr @@ -4,16 +4,15 @@ error: memory leaked: ALLOC (Rust heap, size: 4, align: 4), allocated here: LL | cell.set(Some(Box::leak(Box::new(123)))); | ^^^^^^^^^^^^^ | - = note: this is inside closure - = note: which got called inside `std::thread::LocalKey::>>::try_with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` (at RUSTLIB/std/src/thread/local.rs:LL:CC) - = note: which got called inside `std::thread::LocalKey::>>::with::<{closure@tests/fail/tls_macro_leak.rs:LL:CC}, ()>` (at RUSTLIB/std/src/thread/local.rs:LL:CC) -note: which got called inside closure - --> tests/fail/tls_macro_leak.rs:LL:CC - | -LL | / TLS.with(|cell| { -LL | | cell.set(Some(Box::leak(Box::new(123)))); -LL | | }); - | |__________^ + = note: stack backtrace: + 0: main::{closure#0}::{closure#0} + at tests/fail/tls_macro_leak.rs:LL:CC + 1: std::thread::LocalKey::>>::try_with + at RUSTLIB/std/src/thread/local.rs:LL:CC + 2: std::thread::LocalKey::>>::with + at RUSTLIB/std/src/thread/local.rs:LL:CC + 3: main::{closure#0} + at tests/fail/tls_macro_leak.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr index e504f8dde717e..a51cf50640baa 100644 --- a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr @@ -19,16 +19,11 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { | ^ -note: error occurred inside `stuff` - --> tests/fail/tree_borrows/outside-range.rs:LL:CC - | -LL | unsafe fn stuff(x: &mut u8, y: *mut u8) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/outside-range.rs:LL:CC - | -LL | stuff(&mut *raw, raw); - | ^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: stuff + at tests/fail/tree_borrows/outside-range.rs:LL:CC + 1: main + at tests/fail/tree_borrows/outside-range.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr b/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr index 48527fedcc35f..029b0a56f305f 100644 --- a/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/pass_invalid_mut.stderr @@ -30,16 +30,11 @@ help: the conflicting tag later transitioned to Frozen due to a foreign re LL | let _val = unsafe { *xraw }; // invalidate xref for writing | ^^^^^ = help: this transition corresponds to a loss of write permissions -note: error occurred inside `foo` - --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC - | -LL | fn foo(nope: &mut i32) { - | ^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC - | -LL | foo(xref); - | ^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC + 1: main + at tests/fail/tree_borrows/pass_invalid_mut.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr b/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr index 40a3989c2dc4b..693afb133967c 100644 --- a/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.stderr @@ -18,16 +18,11 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | do_something(*orig_ptr); | ^^^^^^^^^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred inside `access_after_sub_1` - --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC - | -LL | unsafe fn access_after_sub_1(x: &mut u8, orig_ptr: *mut u8) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC - | -LL | access_after_sub_1(&mut *(foo as *mut u8).byte_add(1), orig_ptr); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: access_after_sub_1 + at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC + 1: main + at tests/fail/tree_borrows/repeated_foreign_read_lazy_conflicted.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index 8effbe30dd6ae..29397a8fd0bc7 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -29,16 +29,11 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { | ^ -note: error occurred inside `main::write_second` - --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC - | -LL | unsafe fn write_second(x: &mut UnsafeCell, y: *mut u8) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC - | -LL | write_second(x, y); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::write_second + at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC + 1: main + at tests/fail/tree_borrows/reserved/cell-protected-write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr index 1bc337eb1e7a5..3bddd2ce1de63 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -29,16 +29,11 @@ help: the protected tag was created here, in the initial state Reserved | LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { | ^ -note: error occurred inside `main::write_second` - --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC - | -LL | unsafe fn write_second(x: &mut u8, y: *mut u8) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC - | -LL | write_second(x, y); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::write_second + at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC + 1: main + at tests/fail/tree_borrows/reserved/int-protected-write.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr index 3567340f22024..619e707f36f79 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.with.stderr @@ -32,8 +32,8 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *x = 64; | ^^^^^^^ = help: this transition corresponds to a loss of read and write permissions - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | let thread_2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr index a28730abd9534..2f14900e43e7d 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reservedim_spurious_write.without.stderr @@ -32,8 +32,8 @@ help: the accessed tag later transitioned to Disabled due to a protector r LL | } | ^ = help: this transition corresponds to a loss of read and write permissions - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/tree_borrows/reservedim_spurious_write.rs:LL:CC | LL | let thread_2 = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr index 9e20ec238ed86..12c163aa87549 100644 --- a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr @@ -31,17 +31,13 @@ help: the accessed tag later transitioned to Reserved (conflicted) due to LL | } | ^ = help: this transition corresponds to a temporary loss of write permissions until function exit -note: error occurred on thread `unnamed-ID`, inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` - --> tests/fail/tree_borrows/spurious_read.rs:LL:CC - | -LL | fn as_mut(y: &mut u8, b: (usize, Arc)) -> *mut u8 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside closure - --> tests/fail/tree_borrows/spurious_read.rs:LL:CC - | -LL | let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone()); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: retagx_retagy_retx_writey_rety::{closure#1}::as_mut + at tests/fail/tree_borrows/spurious_read.rs:LL:CC + 1: retagx_retagy_retx_writey_rety::{closure#1} + at tests/fail/tree_borrows/spurious_read.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/fail/tree_borrows/spurious_read.rs:LL:CC | LL | let thread_y = thread::spawn(move || { diff --git a/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr index 9545ebf39a27a..4abaeb66e5272 100644 --- a/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr @@ -18,31 +18,21 @@ help: the strongly protected tag was created here, in the initial state Re | LL | fn inner(x: &mut i32, f: fn(*mut i32)) { | ^ -note: error occurred inside ` as std::ops::Drop>::drop` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | fn drop(&mut self) { - | ^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC - | -LL | drop(unsafe { Box::from_raw(raw) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `<{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) -note: which got called inside `inner` - --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC - | -LL | f(x) - | ^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/strongly-protected.rs:LL:CC - | -LL | / inner(Box::leak(Box::new(0)), |raw| { -LL | | drop(unsafe { Box::from_raw(raw) }); -LL | | }); - | |______^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/tree_borrows/strongly-protected.rs:LL:CC + 4: <{closure@tests/fail/tree_borrows/strongly-protected.rs:LL:CC} as std::ops::FnOnce<(*mut i32,)>>::call_once - shim + at RUSTLIB/core/src/ops/function.rs:LL:CC + 5: inner + at tests/fail/tree_borrows/strongly-protected.rs:LL:CC + 6: main + at tests/fail/tree_borrows/strongly-protected.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr b/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr index 3db6dab3167b2..c27db19cd3e9b 100644 --- a/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.stderr @@ -18,16 +18,11 @@ help: the conflicting tag was created here, in the initial state Frozen | LL | let intermediary = &root; | ^^^^^ -note: error occurred inside `write_to_mut` - --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC - | -LL | fn write_to_mut(m: &mut u8, other_ptr: *const u8) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC - | -LL | write_to_mut(data, core::ptr::addr_of!(root)); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: write_to_mut + at tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC + 1: main + at tests/fail/tree_borrows/subtree_traversal_skipping_diagnostics.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr index d61fe47a871b3..28deb09664c73 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/protected_wildcard.stderr @@ -23,16 +23,11 @@ help: the protected tag was created here, in the initial state Reserved | LL | let mut protect = |_arg: &mut u32| { | ^^^^ -note: error occurred inside closure - --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC - | -LL | let mut protect = |_arg: &mut u32| { - | ^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC - | -LL | protect(wild_ref); - | ^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC + 1: main + at tests/fail/tree_borrows/wildcard/protected_wildcard.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr index cd797cdc0c79a..dce29e63583e9 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/protector_conflicted.stderr @@ -7,12 +7,11 @@ LL | unsafe { *wild = 4 }; = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information = help: there are no exposed tags which may perform this access here - = note: this is inside closure -note: which got called inside `main` - --> tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC - | -LL | protect(ref1); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: main::{closure#0} + at tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC + 1: main + at tests/fail/tree_borrows/wildcard/protector_conflicted.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr b/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr index bcc6b5f5b879c..89d1f8ca556d4 100644 --- a/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.stderr @@ -18,31 +18,21 @@ help: the strongly protected tag was created here, in the initial state Re | LL | fn inner(x: &mut i32, f: fn(usize)) { | ^ -note: error occurred inside ` as std::ops::Drop>::drop` - --> RUSTLIB/alloc/src/boxed.rs:LL:CC - | -LL | fn drop(&mut self) { - | ^^^^^^^^^^^^^^^^^^ - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::boxed::Box))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC - | -LL | drop(unsafe { Box::from_raw(raw as *mut i32) }); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - = note: which got called inside `<{closure@tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC} as std::ops::FnOnce<(usize,)>>::call_once - shim` (at RUSTLIB/core/src/ops/function.rs:LL:CC) -note: which got called inside `inner` - --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC - | -LL | f(x as *mut i32 as usize) - | ^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC - | -LL | / inner(Box::leak(Box::new(0)), |raw| { -LL | | drop(unsafe { Box::from_raw(raw as *mut i32) }); -LL | | }); - | |______^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: main::{closure#0} + at tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC + 4: <{closure@tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC} as std::ops::FnOnce<(usize,)>>::call_once - shim + at RUSTLIB/core/src/ops/function.rs:LL:CC + 5: inner + at tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC + 6: main + at tests/fail/tree_borrows/wildcard/strongly_protected_wildcard.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr b/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr index 11d148bc872e4..e44f306f7fad1 100644 --- a/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/write-during-2phase.stderr @@ -18,22 +18,11 @@ help: the accessed tag later transitioned to Disabled due to a foreign wri LL | *alias = 42; | ^^^^^^^^^^^ = help: this transition corresponds to a loss of read and write permissions -note: error occurred inside `Foo::add` - --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC - | -LL | fn add(&mut self, n: u64) -> u64 { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside `main` - --> tests/fail/tree_borrows/write-during-2phase.rs:LL:CC - | -LL | let res = f.add(unsafe { - | _______________^ -LL | | // This is the access at fault, but it's not immediately apparent because -LL | | // the reference that got invalidated is not under a Protector. -LL | | *alias = 42; -LL | | 0 -LL | | }); - | |______^ + = note: stack backtrace: + 0: Foo::add + at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC + 1: main + at tests/fail/tree_borrows/write-during-2phase.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr b/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr index 6fb62b7664400..2b98a2f99cf9d 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/drop_in_place.stderr @@ -8,12 +8,11 @@ LL | | T: [const] Destruct, | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `std::ptr::drop_in_place:: - shim(Some(PartialDrop))` -note: which got called inside `main` - --> tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC - | -LL | core::ptr::drop_in_place(p); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: std::ptr::drop_in_place - shim(Some(PartialDrop)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/drop_in_place.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr index 61915490917e1..ed5c724a2e2b2 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.stderr @@ -6,12 +6,11 @@ LL | unsafe { (*x).x } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `foo` -note: which got called inside `main` - --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC - | -LL | foo(odd_ptr.cast()); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr index 58db5dda6a2e8..bd44ed1224ec8 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.stderr @@ -6,12 +6,11 @@ LL | unsafe { (*x).packed.x } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `foo` -note: which got called inside `main` - --> tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC - | -LL | foo(odd_ptr.cast()); - | ^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: foo + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/field_requires_parent_struct_alignment2.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr index 56a3bf129ab23..2f3079383d122 100644 --- a/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr +++ b/src/tools/miri/tests/fail/unaligned_pointers/reference_to_packed.stderr @@ -6,12 +6,11 @@ LL | mem::transmute(x) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `raw_to_ref::<'_, i32>` -note: which got called inside `main` - --> tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC - | -LL | let p: &i32 = unsafe { raw_to_ref(ptr::addr_of!(foo.x)) }; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: raw_to_ref + at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC + 1: main + at tests/fail/unaligned_pointers/reference_to_packed.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr index 6a2f038017c0f..e0caff6a21a9d 100644 --- a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr +++ b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic.stderr @@ -6,13 +6,13 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `::compare` - = note: which got called inside `core::slice::cmp::::cmp` (at RUSTLIB/core/src/slice/cmp.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC - | -LL | drop(slice1.cmp(slice2)); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: ::compare + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 1: core::slice::cmp::cmp + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 2: main + at tests/fail/uninit/uninit_alloc_diagnostic.rs:LL:CC Uninitialized memory occurred at ALLOC[0x4..0x10], in this allocation: ALLOC (Rust heap, size: 32, align: 8) { diff --git a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr index f40e796cca611..efad61c14fb80 100644 --- a/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr +++ b/src/tools/miri/tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.stderr @@ -6,13 +6,13 @@ LL | let mut order = unsafe { compare_bytes(left, right, len) as isize } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `::compare` - = note: which got called inside `core::slice::cmp::::cmp` (at RUSTLIB/core/src/slice/cmp.rs:LL:CC) -note: which got called inside `main` - --> tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC - | -LL | drop(slice1.cmp(slice2)); - | ^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: ::compare + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 1: core::slice::cmp::cmp + at RUSTLIB/core/src/slice/cmp.rs:LL:CC + 2: main + at tests/fail/uninit/uninit_alloc_diagnostic_with_provenance.rs:LL:CC Uninitialized memory occurred at ALLOC[0x4..0x8], in this allocation: ALLOC (Rust heap, size: 16, align: 8) { diff --git a/src/tools/miri/tests/fail/unwind-action-terminate.stderr b/src/tools/miri/tests/fail/unwind-action-terminate.stderr index c86d94a820259..2295d80f45e85 100644 --- a/src/tools/miri/tests/fail/unwind-action-terminate.stderr +++ b/src/tools/miri/tests/fail/unwind-action-terminate.stderr @@ -14,24 +14,7 @@ error: abnormal termination: the program aborted execution LL | crate::process::abort(); | ^^^^^^^^^^^^^^^^^^^^^^^ abnormal termination occurred here | - = note: this is inside `std::panicking::panic_with_hook` - = note: which got called inside closure (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `std::sys::backtrace::__rust_end_short_backtrace::<{closure@std::panicking::panic_handler::{closure#0}}, !>` (at RUSTLIB/std/src/sys/backtrace.rs:LL:CC) - = note: which got called inside `std::panicking::panic_handler` (at RUSTLIB/std/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_nounwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) - = note: which got called inside `core::panicking::panic_cannot_unwind` (at RUSTLIB/core/src/panicking.rs:LL:CC) -note: which got called inside `panic_abort` - --> tests/fail/unwind-action-terminate.rs:LL:CC - | -LL | / extern "C" fn panic_abort() { -LL | | panic!() -LL | | } - | |_^ -note: which got called inside `main` - --> tests/fail/unwind-action-terminate.rs:LL:CC - | -LL | panic_abort(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr index 5c7572c76a134..c2e647aa18fcb 100644 --- a/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr +++ b/src/tools/miri/tests/fail/validity/cast_fn_ptr_invalid_caller_arg.stderr @@ -6,12 +6,11 @@ LL | Call(_res = f(*ptr), ReturnTo(retblock), UnwindContinue()) | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `call` -note: which got called inside `main` - --> tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC - | -LL | call(f); - | ^^^^^^^ + = note: stack backtrace: + 0: call + at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC + 1: main + at tests/fail/validity/cast_fn_ptr_invalid_caller_arg.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr b/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr index 6612bcd223947..ecccf204cf81a 100644 --- a/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_char_cast.stderr @@ -6,12 +6,11 @@ LL | RET = *ptr as u32; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `cast` -note: which got called inside `main` - --> tests/fail/validity/invalid_char_cast.rs:LL:CC - | -LL | cast(&v as *const u32 as *const char); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: cast + at tests/fail/validity/invalid_char_cast.rs:LL:CC + 1: main + at tests/fail/validity/invalid_char_cast.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/invalid_char_match.stderr b/src/tools/miri/tests/fail/validity/invalid_char_match.stderr index cda730172177d..818b2e26f8695 100644 --- a/src/tools/miri/tests/fail/validity/invalid_char_match.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_char_match.stderr @@ -9,12 +9,11 @@ LL | | } | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `switch_int` -note: which got called inside `main` - --> tests/fail/validity/invalid_char_match.rs:LL:CC - | -LL | switch_int(&v as *const u32 as *const char); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: switch_int + at tests/fail/validity/invalid_char_match.rs:LL:CC + 1: main + at tests/fail/validity/invalid_char_match.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr b/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr index 6a4d0e0375af4..a02dc678f0184 100644 --- a/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr +++ b/src/tools/miri/tests/fail/validity/invalid_enum_cast.stderr @@ -6,12 +6,11 @@ LL | let _val = *ptr as u32; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `cast` -note: which got called inside `main` - --> tests/fail/validity/invalid_enum_cast.rs:LL:CC - | -LL | cast(&v as *const u32 as *const E); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: cast + at tests/fail/validity/invalid_enum_cast.rs:LL:CC + 1: main + at tests/fail/validity/invalid_enum_cast.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr index 9f3792e0e4095..d2d6da49fc1e5 100644 --- a/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr +++ b/src/tools/miri/tests/fail/weak_memory/weak_uninit.stderr @@ -6,8 +6,8 @@ LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/fail/weak_memory/weak_uninit.rs:LL:CC | LL | let j2 = spawn(move || x.load(Ordering::Relaxed)); diff --git a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr index 85e2810f1f304..2ba64ac032a8d 100644 --- a/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr +++ b/src/tools/miri/tests/genmc/fail/atomics/atomic_ptr_double_free.stderr @@ -17,23 +17,17 @@ help: ALLOC was deallocated here: | LL | dealloc(ptr as *mut u8, Layout::new::()) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: error occurred on thread `unnamed-ID`, inside `free` - --> tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC - | -LL | unsafe fn free(ptr: *mut u64) { - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -note: which got called inside closure - --> tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC - | -LL | free(b); - | ^^^^^^^ - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC}>` - --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: free + at tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC + 1: miri_start::{closure#1} + at tests/genmc/fail/atomics/atomic_ptr_double_free.rs:LL:CC + 2: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 3: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/atomics/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr index 4bca53961f5fe..7534eaf8f37ec 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.dealloc.stderr @@ -7,14 +7,15 @@ LL | dealloc(b as *mut u8, Layout::new::()); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr index 0a03363285b69..77e9817a55c74 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_alloc_race.write.stderr @@ -7,14 +7,15 @@ LL | *b = 42; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_alloc_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr index 29a2e371bb3c8..47df94404efa3 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.stderr @@ -17,18 +17,15 @@ help: ALLOC was deallocated here: | LL | }), | ^ -note: error occurred on thread `unnamed-ID`, inside closure - --> tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC - | -LL | spawn_pthread_closure(|| { - | ^^ - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_dealloc_write_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr index 3f5d0bdf346e9..e2c87b2d25e19 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.stderr @@ -7,14 +7,15 @@ LL | }), | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/atomic_ptr_write_dealloc_race.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr index 48b8a16c8b10c..a3a15a71ce156 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/mpu2_rels_rlx.stderr @@ -7,14 +7,15 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/mpu2_rels_rlx.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr index 2eb3791aaf08f..1220c0c09cbe1 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rel_rlx.stderr @@ -7,14 +7,15 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr index 2eb3791aaf08f..1220c0c09cbe1 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_acq.stderr @@ -7,14 +7,15 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr index 2eb3791aaf08f..1220c0c09cbe1 100644 --- a/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr +++ b/src/tools/miri/tests/genmc/fail/data_race/weak_orderings.rlx_rlx.stderr @@ -7,14 +7,15 @@ LL | X = 2; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/fail/data_race/weak_orderings.rs:LL:CC}>` - --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: miri_start::{closure#1} + at tests/genmc/fail/data_race/weak_orderings.rs:LL:CC + 1: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 2: genmc::spawn_pthread_closure::thread_func + at tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/data_race/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/genmc/fail/shims/exit.stderr b/src/tools/miri/tests/genmc/fail/shims/exit.stderr index 573c8b14fae35..c0d0321defe12 100644 --- a/src/tools/miri/tests/genmc/fail/shims/exit.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/exit.stderr @@ -7,8 +7,8 @@ LL | unsafe { std::hint::unreachable_unchecked() }; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside closure -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` +note: the current function got called indirectly due to this code --> tests/genmc/fail/shims/exit.rs:LL:CC | LL | / std::thread::spawn(|| { diff --git a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr index e32548c4b5d51..272a52ba7fefe 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_diff_thread_unlock.stderr @@ -7,16 +7,19 @@ LL | self.lock.inner.unlock(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is on thread `unnamed-ID`, inside ` as std::ops::Drop>::drop` - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::ptr::drop_in_place::>> - shim(Some(EvilSend>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside closure - --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC - | -LL | drop(guard); - | ^^^^^^^^^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 3: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 4: miri_start::{closure#0} + at tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/fail/shims/mutex_diff_thread_unlock.rs:LL:CC | LL | let handle = std::thread::spawn(move || { diff --git a/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr b/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr index 9fec95ae6770d..d668706f76475 100644 --- a/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr +++ b/src/tools/miri/tests/genmc/fail/shims/mutex_double_unlock.stderr @@ -7,14 +7,15 @@ LL | self.lock.inner.unlock(); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside ` as std::ops::Drop>::drop` - = note: which got called inside `std::ptr::drop_in_place::> - shim(Some(std::sync::MutexGuard<'_, u64>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) - = note: which got called inside `std::mem::drop::>` (at RUSTLIB/core/src/mem/mod.rs:LL:CC) -note: which got called inside `miri_start` - --> tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC - | -LL | drop(guard); - | ^^^^^^^^^^^ + = note: stack backtrace: + 0: as std::ops::Drop>::drop + at RUSTLIB/std/src/sync/poison/mutex.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: std::mem::drop + at RUSTLIB/core/src/mem/mod.rs:LL:CC + 3: miri_start + at tests/genmc/fail/shims/mutex_double_unlock.rs:LL:CC note: add `-Zmiri-genmc-print-genmc-output` to MIRIFLAGS to see the detailed GenMC error report diff --git a/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr b/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr index 2fc6e3d472297..5ddcce1fa30c3 100644 --- a/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/alloc_large.multiple.stderr @@ -6,16 +6,19 @@ LL | AllocInit::Uninitialized => alloc.allocate(layout), | ^^^^^^^^^^^^^^^^^^^^^^ resource exhaustion occurred here | = help: in GenMC mode, the address space is limited to 4GB per thread, and addresses cannot be reused - = note: this is inside `alloc::raw_vec::RawVecInner::try_allocate_in` - = note: which got called inside `alloc::raw_vec::RawVecInner::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) - = note: which got called inside `alloc::raw_vec::RawVec::::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) - = note: which got called inside `std::vec::Vec::::with_capacity_in` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) - = note: which got called inside `std::vec::Vec::::with_capacity` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) -note: which got called inside `miri_start` - --> tests/genmc/fail/simple/alloc_large.rs:LL:CC - | -LL | let _v = Vec::::with_capacity(1024 * 1024 * 1024); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: alloc::raw_vec::RawVecInner::try_allocate_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 1: alloc::raw_vec::RawVecInner::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 2: alloc::raw_vec::RawVec::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 3: std::vec::Vec::with_capacity_in + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 4: std::vec::Vec::with_capacity + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 5: miri_start + at tests/genmc/fail/simple/alloc_large.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr b/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr index dbd39e4727c2a..5ddcce1fa30c3 100644 --- a/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr +++ b/src/tools/miri/tests/genmc/fail/simple/alloc_large.single.stderr @@ -6,16 +6,19 @@ LL | AllocInit::Uninitialized => alloc.allocate(layout), | ^^^^^^^^^^^^^^^^^^^^^^ resource exhaustion occurred here | = help: in GenMC mode, the address space is limited to 4GB per thread, and addresses cannot be reused - = note: this is inside `alloc::raw_vec::RawVecInner::try_allocate_in` - = note: which got called inside `alloc::raw_vec::RawVecInner::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) - = note: which got called inside `alloc::raw_vec::RawVec::::with_capacity_in` (at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC) - = note: which got called inside `std::vec::Vec::::with_capacity_in` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) - = note: which got called inside `std::vec::Vec::::with_capacity` (at RUSTLIB/alloc/src/vec/mod.rs:LL:CC) -note: which got called inside `miri_start` - --> tests/genmc/fail/simple/alloc_large.rs:LL:CC - | -LL | let _v = Vec::::with_capacity(8 * 1024 * 1024 * 1024); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: alloc::raw_vec::RawVecInner::try_allocate_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 1: alloc::raw_vec::RawVecInner::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 2: alloc::raw_vec::RawVec::with_capacity_in + at RUSTLIB/alloc/src/raw_vec/mod.rs:LL:CC + 3: std::vec::Vec::with_capacity_in + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 4: std::vec::Vec::with_capacity + at RUSTLIB/alloc/src/vec/mod.rs:LL:CC + 5: miri_start + at tests/genmc/fail/simple/alloc_large.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr index 6d597aaa6342d..24bde07924d1f 100644 --- a/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr +++ b/src/tools/miri/tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.stderr @@ -5,19 +5,17 @@ warning: GenMC currently does not model the failure ordering for `compare_exchan LL | match KEY.compare_exchange(KEY_SENTVAL, key, Release, Acquire) { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ GenMC might miss possible behaviors of this code | - = note: this is on thread `unnamed-ID`, inside `get_or_init` -note: which got called inside closure - --> tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC - | -LL | let key = get_or_init(0); - | ^^^^^^^^^^^^^^ - = note: which got called inside ` as std::ops::FnOnce<()>>::call_once` (at RUSTLIB/alloc/src/boxed.rs:LL:CC) -note: which got called inside `genmc::spawn_pthread_closure::thread_func::<{closure@tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC}>` - --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC - | -LL | f(); - | ^^^ -note: which got called indirectly due to this code + = note: this is on thread `unnamed-ID` + = note: stack backtrace: + 0: get_or_init + at tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC + 1: miri_start::{closure#0} + at tests/genmc/pass/atomics/cas_failure_ord_racy_key_init.rs:LL:CC + 2: as std::ops::FnOnce<()>>::call_once + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 3: genmc::spawn_pthread_closure::thread_func + at tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC +note: the last function in that backtrace got called indirectly due to this code --> tests/genmc/pass/atomics/../../../utils/genmc.rs:LL:CC | LL | / libc::pthread_create( diff --git a/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr b/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr index 4a7d24090641f..032461b6ed3f6 100644 --- a/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr +++ b/src/tools/miri/tests/native-lib/fail/tracing/partial_init.stderr @@ -9,12 +9,11 @@ LL | init_n(2, slice_ptr); = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: this is inside `partial_init` -note: which got called inside `main` - --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC - | -LL | partial_init(); - | ^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: partial_init + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC error: Undefined Behavior: reading memory at ALLOC[0x2..0x3], but memory is uninitialized at [0x2..0x3], and this operation requires initialized memory --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC @@ -24,12 +23,11 @@ LL | let _val = *slice_ptr.offset(2); | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `partial_init` -note: which got called inside `main` - --> tests/native-lib/fail/tracing/partial_init.rs:LL:CC - | -LL | partial_init(); - | ^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: partial_init + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/partial_init.rs:LL:CC Uninitialized memory occurred at ALLOC[0x2..0x3], in this allocation: ALLOC (stack variable, size: 3, align: 1) { diff --git a/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr b/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr index 825c9666b7499..773d2dd63c3e7 100644 --- a/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr +++ b/src/tools/miri/tests/native-lib/fail/tracing/unexposed_reachable_alloc.stderr @@ -9,12 +9,11 @@ LL | unsafe { do_one_deref(exposed) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: this is inside `unexposed_reachable_alloc` -note: which got called inside `main` - --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC - | -LL | unexposed_reachable_alloc(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unexposed_reachable_alloc + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC error: Undefined Behavior: memory access failed: attempting to access 4 bytes, but got $HEX[noalloc] which is a dangling pointer (it has no provenance) --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC @@ -24,12 +23,11 @@ LL | let _not_ok = *invalid; | = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information - = note: this is inside `unexposed_reachable_alloc` -note: which got called inside `main` - --> tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC - | -LL | unexposed_reachable_alloc(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: unexposed_reachable_alloc + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC + 1: main + at tests/native-lib/fail/tracing/unexposed_reachable_alloc.rs:LL:CC note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr index cbccd8fb62f49..b6bbb4342b77e 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.notrace.stderr @@ -8,12 +8,11 @@ LL | unsafe { print_pointer(&x) }; = help: in particular, Miri assumes that the native call initializes all memory it has access to = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free - = note: this is inside `test_access_pointer` -note: which got called inside `main` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | test_access_pointer(); - | ^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_access_pointer + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC warning: sharing a function pointer with a native function called via FFI --> tests/native-lib/pass/ptr_read_access.rs:LL:CC @@ -22,10 +21,9 @@ LL | pass_fn_ptr(Some(nop)); // this one is not | ^^^^^^^^^^^^^^^^^^^^^^ sharing a function pointer with a native function | = help: calling Rust functions from C is not supported and will, in the best case, crash the program - = note: this is inside `pass_fn_ptr` -note: which got called inside `main` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | pass_fn_ptr(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: pass_fn_ptr + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC diff --git a/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr index 2697fb6d4353f..0d86ea066099a 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_read_access.trace.stderr @@ -9,12 +9,11 @@ LL | unsafe { print_pointer(&x) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: this is inside `test_access_pointer` -note: which got called inside `main` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | test_access_pointer(); - | ^^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_access_pointer + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC warning: sharing a function pointer with a native function called via FFI --> tests/native-lib/pass/ptr_read_access.rs:LL:CC @@ -23,10 +22,9 @@ LL | pass_fn_ptr(Some(nop)); // this one is not | ^^^^^^^^^^^^^^^^^^^^^^ sharing a function pointer with a native function | = help: calling Rust functions from C is not supported and will, in the best case, crash the program - = note: this is inside `pass_fn_ptr` -note: which got called inside `main` - --> tests/native-lib/pass/ptr_read_access.rs:LL:CC - | -LL | pass_fn_ptr(); - | ^^^^^^^^^^^^^ + = note: stack backtrace: + 0: pass_fn_ptr + at tests/native-lib/pass/ptr_read_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_read_access.rs:LL:CC diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr index c7edaa3731676..15b2bc6df63fa 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.notrace.stderr @@ -8,10 +8,9 @@ LL | unsafe { increment_int(&mut x) }; = help: in particular, Miri assumes that the native call initializes all memory it has access to = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free - = note: this is inside `test_increment_int` -note: which got called inside `main` - --> tests/native-lib/pass/ptr_write_access.rs:LL:CC - | -LL | test_increment_int(); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_increment_int + at tests/native-lib/pass/ptr_write_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_write_access.rs:LL:CC diff --git a/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr b/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr index dacde45e17a12..d12a25f84b370 100644 --- a/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr +++ b/src/tools/miri/tests/native-lib/pass/ptr_write_access.trace.stderr @@ -9,10 +9,9 @@ LL | unsafe { increment_int(&mut x) }; = help: Miri also assumes that any part of this memory may be a pointer that is permitted to point to arbitrary exposed memory = help: what this means is that Miri will easily miss Undefined Behavior related to incorrect usage of this shared memory, so you should not take a clean Miri run as a signal that your FFI code is UB-free = help: tracing memory accesses in native code is not yet fully implemented, so there can be further imprecisions beyond what is documented here - = note: this is inside `test_increment_int` -note: which got called inside `main` - --> tests/native-lib/pass/ptr_write_access.rs:LL:CC - | -LL | test_increment_int(); - | ^^^^^^^^^^^^^^^^^^^^ + = note: stack backtrace: + 0: test_increment_int + at tests/native-lib/pass/ptr_write_access.rs:LL:CC + 1: main + at tests/native-lib/pass/ptr_write_access.rs:LL:CC diff --git a/src/tools/miri/tests/panic/panic1.stderr b/src/tools/miri/tests/panic/panic1.stderr index ff7e287b5a585..d709428f3115d 100644 --- a/src/tools/miri/tests/panic/panic1.stderr +++ b/src/tools/miri/tests/panic/panic1.stderr @@ -3,11 +3,11 @@ thread 'main' ($TID) panicked at tests/panic/panic1.rs:LL:CC: panicking from libstd stack backtrace: 0: std::panicking::panic_handler - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 1: std::rt::panic_fmt - at RUSTLIB/core/src/panicking.rs:LL:CC + at RUSTLIB/core/src/panicking.rs:LL:CC 2: main - at tests/panic/panic1.rs:LL:CC + at tests/panic/panic1.rs:LL:CC 3: >::call_once - shim(fn()) - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. diff --git a/src/tools/miri/tests/pass/alloc-access-tracking.stderr b/src/tools/miri/tests/pass/alloc-access-tracking.stderr index b5b1bc2a7bc2b..5dfcd0180e4c1 100644 --- a/src/tools/miri/tests/pass/alloc-access-tracking.stderr +++ b/src/tools/miri/tests/pass/alloc-access-tracking.stderr @@ -24,11 +24,11 @@ note: freed allocation ALLOC LL | self.1.deallocate(From::from(ptr.cast()), layout); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ tracking was triggered here | - = note: this is inside `> as std::ops::Drop>::drop` - = note: which got called inside `std::ptr::drop_in_place::>> - shim(Some(std::boxed::Box>))` (at RUSTLIB/core/src/ptr/mod.rs:LL:CC) -note: which got called inside `main` - --> tests/pass/alloc-access-tracking.rs:LL:CC - | -LL | } - | ^ + = note: stack backtrace: + 0: > as std::ops::Drop>::drop + at RUSTLIB/alloc/src/boxed.rs:LL:CC + 1: std::ptr::drop_in_place)) + at RUSTLIB/core/src/ptr/mod.rs:LL:CC + 2: main + at tests/pass/alloc-access-tracking.rs:LL:CC diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr b/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr index 588bb85f35a4f..b4ef3f76c20f7 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr +++ b/src/tools/miri/tests/pass/backtrace/backtrace-global-alloc.stderr @@ -1,28 +1,28 @@ 0: main - at tests/pass/backtrace/backtrace-global-alloc.rs:LL:CC + at tests/pass/backtrace/backtrace-global-alloc.rs:LL:CC 1: >::call_once - shim(fn()) - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 2: std::sys::backtrace::__rust_begin_short_backtrace - at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC 3: std::rt::lang_start::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 4: std::ops::function::impls::call_once - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 5: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 6: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 7: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 8: std::rt::lang_start_internal::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 9: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 10: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 11: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 12: std::rt::lang_start_internal - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 13: std::rt::lang_start - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC diff --git a/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr b/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr index 9c952755957b1..706eacc70fd8d 100644 --- a/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr +++ b/src/tools/miri/tests/pass/backtrace/backtrace-std.stderr @@ -1,36 +1,36 @@ 0: func_d - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 1: func_c - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 2: func_b - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 3: func_a - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 4: main - at tests/pass/backtrace/backtrace-std.rs:LL:CC + at tests/pass/backtrace/backtrace-std.rs:LL:CC 5: >::call_once - shim(fn()) - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 6: std::sys::backtrace::__rust_begin_short_backtrace - at RUSTLIB/std/src/sys/backtrace.rs:LL:CC + at RUSTLIB/std/src/sys/backtrace.rs:LL:CC 7: std::rt::lang_start::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 8: std::ops::function::impls::call_once - at RUSTLIB/core/src/ops/function.rs:LL:CC + at RUSTLIB/core/src/ops/function.rs:LL:CC 9: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 10: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 11: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 12: std::rt::lang_start_internal::{closure#0} - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 13: std::panicking::catch_unwind::do_call - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 14: std::panicking::catch_unwind - at RUSTLIB/std/src/panicking.rs:LL:CC + at RUSTLIB/std/src/panicking.rs:LL:CC 15: std::panic::catch_unwind - at RUSTLIB/std/src/panic.rs:LL:CC + at RUSTLIB/std/src/panic.rs:LL:CC 16: std::rt::lang_start_internal - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC 17: std::rt::lang_start - at RUSTLIB/std/src/rt.rs:LL:CC + at RUSTLIB/std/src/rt.rs:LL:CC diff --git a/src/tools/miri/tests/ui.rs b/src/tools/miri/tests/ui.rs index 8a3ab658b6694..70739eef28838 100644 --- a/src/tools/miri/tests/ui.rs +++ b/src/tools/miri/tests/ui.rs @@ -255,8 +255,6 @@ regexes! { "<[0-9]+=" => " "$1", - // erase whitespace that differs between platforms - r" +at (.*\.rs)" => " at $1", // erase generics in backtraces "([0-9]+: .*)::<.*>" => "$1", // erase long hexadecimals From 4ba9b739a4b224ed6dd514309653a1db5cdfe486 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Wed, 31 Dec 2025 10:51:58 +0100 Subject: [PATCH 5/5] fix non-determinism in os_unfair_lock test --- .../fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs index 1c31236a2f805..f1389dd0821fb 100644 --- a/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs +++ b/src/tools/miri/tests/fail-dep/concurrency/apple_os_unfair_lock_move_with_queue.rs @@ -1,4 +1,5 @@ //@only-target: darwin +//@compile-flags: -Zmiri-fixed-schedule #![feature(sync_unsafe_cell)] use std::cell::SyncUnsafeCell;