From 21527d23d2ef1511abfb39fada406b47577077e1 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Mar 2024 21:04:20 +0100 Subject: [PATCH] Tree Borrows: print where the forbidden access happens; make tag tracking less verbose --- src/tools/miri/src/borrow_tracker/mod.rs | 11 +++++++++-- .../borrow_tracker/tree_borrows/diagnostics.rs | 8 +++++++- .../miri/src/borrow_tracker/tree_borrows/mod.rs | 15 +++++++++------ .../miri/src/borrow_tracker/tree_borrows/tree.rs | 7 ++++++- .../alias_through_mutation.tree.stderr | 4 ++-- .../fail/both_borrows/aliasing_mut1.tree.stderr | 4 ++-- .../fail/both_borrows/aliasing_mut2.tree.stderr | 4 ++-- .../fail/both_borrows/aliasing_mut3.tree.stderr | 4 ++-- .../fail/both_borrows/aliasing_mut4.tree.stderr | 4 ++-- .../box_exclusive_violation1.tree.stderr | 4 ++-- .../box_noalias_violation.tree.stderr | 4 ++-- .../both_borrows/buggy_as_mut_slice.tree.stderr | 4 ++-- .../both_borrows/buggy_split_at_mut.tree.stderr | 4 ++-- .../fail/both_borrows/illegal_write1.tree.stderr | 4 ++-- .../fail/both_borrows/illegal_write5.tree.stderr | 4 ++-- .../fail/both_borrows/illegal_write6.tree.stderr | 4 ++-- .../invalidate_against_protector2.tree.stderr | 4 ++-- .../invalidate_against_protector3.tree.stderr | 4 ++-- .../both_borrows/load_invalid_shr.tree.stderr | 4 ++-- .../mut_exclusive_violation1.tree.stderr | 4 ++-- .../mut_exclusive_violation2.tree.stderr | 4 ++-- .../newtype_pair_retagging.tree.stderr | 4 ++-- .../both_borrows/newtype_retagging.tree.stderr | 4 ++-- .../fail/both_borrows/outdated_local.tree.stderr | 4 ++-- .../both_borrows/pass_invalid_shr.tree.stderr | 4 ++-- .../pass_invalid_shr_option.tree.stderr | 4 ++-- .../pass_invalid_shr_tuple.tree.stderr | 4 ++-- .../both_borrows/return_invalid_shr.tree.stderr | 4 ++-- .../return_invalid_shr_option.tree.stderr | 4 ++-- .../return_invalid_shr_tuple.tree.stderr | 4 ++-- .../shr_frozen_violation1.tree.stderr | 4 ++-- .../shr_frozen_violation2.tree.stderr | 4 ++-- .../function_calls/arg_inplace_mutate.tree.stderr | 4 ++-- .../arg_inplace_observe_during.tree.stderr | 4 ++-- .../return_pointer_aliasing.tree.stderr | 4 ++-- .../return_pointer_aliasing2.tree.stderr | 4 ++-- .../fail/tree_borrows/alternate-read-write.stderr | 4 ++-- .../tree_borrows/children-can-alias.uniq.stderr | 4 ++-- .../tests/fail/tree_borrows/error-range.stderr | 4 ++-- .../fail/tree_borrows/fnentry_invalidation.stderr | 4 ++-- .../tests/fail/tree_borrows/outside-range.stderr | 4 ++-- .../parent_read_freezes_raw_mut.stderr | 4 ++-- .../fail/tree_borrows/pass_invalid_mut.stderr | 4 ++-- .../reserved/cell-protected-write.stderr | 4 ++-- .../reserved/int-protected-write.stderr | 4 ++-- .../fail/tree_borrows/return_invalid_mut.stderr | 4 ++-- .../tests/fail/tree_borrows/spurious_read.stderr | 4 ++-- .../fail/tree_borrows/strongly-protected.stderr | 4 ++-- .../tests/fail/tree_borrows/unique.default.stderr | 4 ++-- .../tests/fail/tree_borrows/unique.uniq.stderr | 4 ++-- .../fail/tree_borrows/write-during-2phase.stderr | 4 ++-- 51 files changed, 125 insertions(+), 104 deletions(-) diff --git a/src/tools/miri/src/borrow_tracker/mod.rs b/src/tools/miri/src/borrow_tracker/mod.rs index 2e784e74195..262f7c449d2 100644 --- a/src/tools/miri/src/borrow_tracker/mod.rs +++ b/src/tools/miri/src/borrow_tracker/mod.rs @@ -377,7 +377,12 @@ fn on_stack_pop( if matches!(kind, AllocKind::LiveData) { let alloc_extra = this.get_alloc_extra(*alloc_id)?; // can still fail for `extern static` let alloc_borrow_tracker = &alloc_extra.borrow_tracker.as_ref().unwrap(); - alloc_borrow_tracker.release_protector(&this.machine, borrow_tracker, *tag)?; + alloc_borrow_tracker.release_protector( + &this.machine, + borrow_tracker, + *tag, + *alloc_id, + )?; } } borrow_tracker.borrow_mut().end_call(&frame.extra); @@ -491,10 +496,12 @@ pub fn release_protector<'tcx>( machine: &MiriMachine<'_, 'tcx>, global: &GlobalState, tag: BorTag, + alloc_id: AllocId, // diagnostics ) -> InterpResult<'tcx> { match self { AllocState::StackedBorrows(_sb) => Ok(()), - AllocState::TreeBorrows(tb) => tb.borrow_mut().release_protector(machine, global, tag), + AllocState::TreeBorrows(tb) => + tb.borrow_mut().release_protector(machine, global, tag, alloc_id), } } } diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/diagnostics.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/diagnostics.rs index 0663417ca41..4394e3c2c86 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/diagnostics.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/diagnostics.rs @@ -278,6 +278,8 @@ fn extract_relevant(&self, error_offset: u64, error_kind: TransitionError) -> Se pub(super) struct TbError<'node> { /// What failure occurred. pub error_kind: TransitionError, + /// The allocation in which the error is happening. + pub alloc_id: AllocId, /// The offset (into the allocation) at which the conflict occurred. pub error_offset: u64, /// The tag on which the error was triggered. @@ -300,7 +302,11 @@ pub fn build<'tcx>(self) -> InterpError<'tcx> { let accessed = self.accessed_info; let conflicting = self.conflicting_info; let accessed_is_conflicting = accessed.tag == conflicting.tag; - let title = format!("{cause} through {accessed} is forbidden"); + let title = format!( + "{cause} through {accessed} at {alloc_id:?}[{offset:#x}] is forbidden", + alloc_id = self.alloc_id, + offset = self.error_offset + ); let (title, details, conflicting_tag_name) = match self.error_kind { ChildAccessForbidden(perm) => { let conflicting_tag_name = diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs index 8618ab42e91..4b944ea88f5 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/mod.rs @@ -1,6 +1,3 @@ -use rustc_target::abi::{Abi, Size}; - -use crate::borrow_tracker::{GlobalState, GlobalStateInner, ProtectorKind}; use rustc_middle::{ mir::{Mutability, RetagKind}, ty::{ @@ -10,7 +7,9 @@ }, }; use rustc_span::def_id::DefId; +use rustc_target::abi::{Abi, Size}; +use crate::borrow_tracker::{GlobalState, GlobalStateInner, ProtectorKind}; use crate::*; pub mod diagnostics; @@ -70,6 +69,7 @@ pub fn before_memory_access( tag, Some(range), global, + alloc_id, span, diagnostics::AccessCause::Explicit(access_kind), ) @@ -78,7 +78,7 @@ pub fn before_memory_access( /// Check that this pointer has permission to deallocate this range. pub fn before_memory_deallocation( &mut self, - _alloc_id: AllocId, + alloc_id: AllocId, prov: ProvenanceExtra, range: AllocRange, machine: &MiriMachine<'_, 'tcx>, @@ -91,7 +91,7 @@ pub fn before_memory_deallocation( }; let global = machine.borrow_tracker.as_ref().unwrap(); let span = machine.current_span(); - self.dealloc(tag, range, global, span) + self.dealloc(tag, range, global, alloc_id, span) } pub fn expose_tag(&mut self, _tag: BorTag) { @@ -109,6 +109,7 @@ pub fn release_protector( machine: &MiriMachine<'_, 'tcx>, global: &GlobalState, tag: BorTag, + alloc_id: AllocId, // diagnostics ) -> InterpResult<'tcx> { let span = machine.current_span(); self.perform_access( @@ -116,6 +117,7 @@ pub fn release_protector( tag, None, // no specified range because it occurs on the entire allocation global, + alloc_id, span, diagnostics::AccessCause::FnExit, ) @@ -211,7 +213,7 @@ fn tb_reborrow( let global = this.machine.borrow_tracker.as_ref().unwrap().borrow(); let ty = place.layout.ty; if global.tracked_pointer_tags.contains(&new_tag) { - let kind_str = format!("{new_perm:?} (pointee type {ty})"); + let kind_str = format!("initial state {} (pointee type {ty})", new_perm.initial_state); this.emit_diagnostic(NonHaltingDiagnostic::CreatedPointerTag( new_tag.inner(), Some(kind_str), @@ -299,6 +301,7 @@ fn tb_reborrow( orig_tag, Some(range), this.machine.borrow_tracker.as_ref().unwrap(), + alloc_id, this.machine.current_span(), diagnostics::AccessCause::Reborrow, )?; diff --git a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs index c7c15150fbd..dda1c7cca19 100644 --- a/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs +++ b/src/tools/miri/src/borrow_tracker/tree_borrows/tree.rs @@ -516,13 +516,15 @@ pub fn dealloc( tag: BorTag, access_range: AllocRange, global: &GlobalState, - span: Span, // diagnostics + alloc_id: AllocId, // diagnostics + span: Span, // diagnostics ) -> InterpResult<'tcx> { self.perform_access( AccessKind::Write, tag, Some(access_range), global, + alloc_id, span, diagnostics::AccessCause::Dealloc, )?; @@ -545,6 +547,7 @@ pub fn dealloc( TbError { conflicting_info, access_cause: diagnostics::AccessCause::Dealloc, + alloc_id, error_offset: perms_range.start, error_kind, accessed_info, @@ -576,6 +579,7 @@ pub fn perform_access( tag: BorTag, access_range: Option, global: &GlobalState, + alloc_id: AllocId, // diagnostics span: Span, // diagnostics access_cause: diagnostics::AccessCause, // diagnostics ) -> InterpResult<'tcx> { @@ -628,6 +632,7 @@ pub fn perform_access( TbError { conflicting_info, access_cause, + alloc_id, error_offset: perms_range.start, error_kind, accessed_info, diff --git a/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.tree.stderr b/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.tree.stderr index db36d696e1d..f26e8444a9a 100644 --- a/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/alias_through_mutation.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through is forbidden +error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden --> $DIR/alias_through_mutation.rs:LL:CC | LL | let _val = *target_alias; - | ^^^^^^^^^^^^^ read access through is forbidden + | ^^^^^^^^^^^^^ read access through at ALLOC[0x0] 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 is a child of the conflicting tag 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 4ee154eeb99..3aff0a41de2 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/aliasing_mut1.rs:LL:CC | LL | *x = 1; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 has state Reserved (conflicted) which forbids this child write access 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 4b15e931654..d8602a54c64 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/aliasing_mut2.rs:LL:CC | LL | *y = 2; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 has state Reserved (conflicted) which forbids this child write access 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 7b8082292a1..83191962a3f 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/aliasing_mut3.rs:LL:CC | LL | *x = 1; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 has state Reserved (conflicted) which forbids this child write access 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 5dbcd393218..b1f1e231e5a 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> RUSTLIB/core/src/mem/mod.rs:LL:CC | LL | ptr::write(dest, src); - | ^^^^^^^^^^^^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] 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 is foreign to the protected tag (i.e., it is not a child) 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 68ed09409bf..ee5ef0c5ea8 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/box_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; - | ^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag 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 824a2d36fc4..95cf37c8123 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through is forbidden +error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden --> $DIR/box_noalias_violation.rs:LL:CC | LL | *y - | ^^ read access through is forbidden + | ^^ read access through at ALLOC[0x0] 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 is foreign to the protected tag (i.e., it is not a child) diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr index 4e5a8bbe0e0..5593db89971 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x4] is forbidden --> $DIR/buggy_as_mut_slice.rs:LL:CC | LL | v2[1] = 7; - | ^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^ write access through at ALLOC[0x4] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr index 7fc795db097..7d3725d611a 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_split_at_mut.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x4] is forbidden --> $DIR/buggy_split_at_mut.rs:LL:CC | LL | b[1] = 6; - | ^^^^^^^^ write access through is forbidden + | ^^^^^^^^ write access through at ALLOC[0x4] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write1.tree.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write1.tree.stderr index 5dd51b5f257..6241c9db0d2 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write1.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write1.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/illegal_write1.rs:LL:CC | LL | unsafe { *x = 42 }; - | ^^^^^^^ write access through is forbidden + | ^^^^^^^ write access through at ALLOC[0x0] 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 has state Frozen which forbids this child write access diff --git a/src/tools/miri/tests/fail/both_borrows/illegal_write5.tree.stderr b/src/tools/miri/tests/fail/both_borrows/illegal_write5.tree.stderr index 3698937d6fc..1f3d6e387d4 100644 --- a/src/tools/miri/tests/fail/both_borrows/illegal_write5.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/illegal_write5.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through is forbidden +error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden --> $DIR/illegal_write5.rs:LL:CC | LL | let _val = *xref; - | ^^^^^ read access through is forbidden + | ^^^^^ read access through at ALLOC[0x0] 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 is a child of the conflicting tag 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 37d5147b5d0..2e161ceea88 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/illegal_write6.rs:LL:CC | LL | unsafe { *y = 2 }; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 is foreign to the protected tag (i.e., it is not a child) 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 4ba80e13318..9fa52262f7e 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/invalidate_against_protector2.rs:LL:CC | LL | unsafe { *x = 0 }; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 is foreign to the protected tag (i.e., it is not a child) 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 5a8fbe4ce5b..2cf476c837c 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through (root of the allocation) is forbidden +error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden --> $DIR/invalidate_against_protector3.rs:LL:CC | LL | unsafe { *x = 0 }; - | ^^^^^^ write access through (root of the allocation) is forbidden + | ^^^^^^ write access through (root of the allocation) at ALLOC[0x0] 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) diff --git a/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.tree.stderr b/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.tree.stderr index 5de9c9c1478..292dc8150f1 100644 --- a/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/load_invalid_shr.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden --> $DIR/load_invalid_shr.rs:LL:CC | LL | let _val = *xref_in_mem; - | ^^^^^^^^^^^^ reborrow through is forbidden + | ^^^^^^^^^^^^ reborrow through at ALLOC[0x0] 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 is a child of the conflicting tag 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 892b1299bbc..a5e62e9ea33 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/mut_exclusive_violation1.rs:LL:CC | LL | *LEAK = 7; - | ^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr index ca5ac5ac88b..6b6eecbe413 100644 --- a/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/mut_exclusive_violation2.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/mut_exclusive_violation2.rs:LL:CC | LL | *raw1 = 3; - | ^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag 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 3900f5b233e..0a54f14bb5e 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: deallocation through is forbidden +error: Undefined Behavior: deallocation through at ALLOC[0x0] is forbidden --> RUSTLIB/alloc/src/alloc.rs:LL:CC | LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocation through is forbidden + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocation through at ALLOC[0x0] 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 is foreign to the protected tag (i.e., it is not a child) 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 dd1344a3ce3..05f1d8822c8 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: deallocation through is forbidden +error: Undefined Behavior: deallocation through at ALLOC[0x0] is forbidden --> RUSTLIB/alloc/src/alloc.rs:LL:CC | LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocation through is forbidden + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocation through at ALLOC[0x0] 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 is foreign to the protected tag (i.e., it is not a child) diff --git a/src/tools/miri/tests/fail/both_borrows/outdated_local.tree.stderr b/src/tools/miri/tests/fail/both_borrows/outdated_local.tree.stderr index 4f79c427b91..60de8417c10 100644 --- a/src/tools/miri/tests/fail/both_borrows/outdated_local.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/outdated_local.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through is forbidden +error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden --> $DIR/outdated_local.rs:LL:CC | LL | assert_eq!(unsafe { *y }, 1); - | ^^ read access through is forbidden + | ^^ read access through at ALLOC[0x0] 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 has state Disabled which forbids this child read access diff --git a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.tree.stderr b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.tree.stderr index 8060ea9c4a6..97a6efa9f6a 100644 --- a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden --> $DIR/pass_invalid_shr.rs:LL:CC | LL | foo(xref); - | ^^^^ reborrow through is forbidden + | ^^^^ reborrow through at ALLOC[0x0] 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 has state Disabled which forbids this reborrow (acting as a child read access) diff --git a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr index 6a92fec38ff..f2eaf767a47 100644 --- a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_option.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden --> $DIR/pass_invalid_shr_option.rs:LL:CC | LL | foo(some_xref); - | ^^^^^^^^^ reborrow through is forbidden + | ^^^^^^^^^ reborrow through at ALLOC[0x0] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr index d391c334faf..9cfd4239c85 100644 --- a/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/pass_invalid_shr_tuple.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden --> $DIR/pass_invalid_shr_tuple.rs:LL:CC | LL | foo(pair_xref); - | ^^^^^^^^^ reborrow through is forbidden + | ^^^^^^^^^ reborrow through at ALLOC[0x0] 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 is a child of the conflicting tag 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 9358520d8ed..0d19681f637 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x4] is forbidden --> $DIR/return_invalid_shr.rs:LL:CC | LL | ret - | ^^^ reborrow through is forbidden + | ^^^ reborrow through at ALLOC[0x4] 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 has state Disabled which forbids this reborrow (acting as a child read access) 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 d60df19f945..1169200b57c 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x4] is forbidden --> $DIR/return_invalid_shr_option.rs:LL:CC | LL | ret - | ^^^ reborrow through is forbidden + | ^^^ reborrow through at ALLOC[0x4] 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 is a child of the conflicting tag 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 b252c691c8d..af410534140 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x4] is forbidden --> $DIR/return_invalid_shr_tuple.rs:LL:CC | LL | ret - | ^^^ reborrow through is forbidden + | ^^^ reborrow through at ALLOC[0x4] 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 is a child of the conflicting tag 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 c2025332b9f..97cd64c03be 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/shr_frozen_violation1.rs:LL:CC | LL | *(x as *const i32 as *mut i32) = 7; - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr index 40f2d89850e..96c2e39edd2 100644 --- a/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr +++ b/src/tools/miri/tests/fail/both_borrows/shr_frozen_violation2.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through is forbidden +error: Undefined Behavior: read access through at ALLOC[0x0] is forbidden --> $DIR/shr_frozen_violation2.rs:LL:CC | LL | let _val = *frozen; - | ^^^^^^^ read access through is forbidden + | ^^^^^^^ read access through at ALLOC[0x0] 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 has state Disabled which forbids this child read access 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 4fe9b7b4728..354631bdcb5 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through (root of the allocation) is forbidden +error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden --> $DIR/arg_inplace_mutate.rs:LL:CC | LL | unsafe { ptr.write(S(0)) }; - | ^^^^^^^^^^^^^^^ write access through (root of the allocation) is forbidden + | ^^^^^^^^^^^^^^^ write access through (root of the allocation) at ALLOC[0x0] 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) 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 67906f24bbd..64888cce613 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through (root of the allocation) is forbidden +error: Undefined Behavior: read access through (root of the allocation) at ALLOC[0x0] is forbidden --> $DIR/arg_inplace_observe_during.rs:LL:CC | LL | unsafe { ptr.read() }; - | ^^^^^^^^^^ read access through (root of the allocation) is forbidden + | ^^^^^^^^^^ read access through (root of the allocation) at ALLOC[0x0] 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) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing.tree.stderr index 6b3f5fbedee..bbedba5a7dd 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through (root of the allocation) is forbidden +error: Undefined Behavior: read access through (root of the allocation) at ALLOC[0x0] is forbidden --> $DIR/return_pointer_aliasing.rs:LL:CC | LL | unsafe { ptr.read() }; - | ^^^^^^^^^^ read access through (root of the allocation) is forbidden + | ^^^^^^^^^^ read access through (root of the allocation) at ALLOC[0x0] 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) diff --git a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing2.tree.stderr b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing2.tree.stderr index 37c98eabbec..146bcfc7c47 100644 --- a/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing2.tree.stderr +++ b/src/tools/miri/tests/fail/function_calls/return_pointer_aliasing2.tree.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through (root of the allocation) is forbidden +error: Undefined Behavior: write access through (root of the allocation) at ALLOC[0x0] is forbidden --> $DIR/return_pointer_aliasing2.rs:LL:CC | LL | unsafe { ptr.write(0) }; - | ^^^^^^^^^^^^ write access through (root of the allocation) is forbidden + | ^^^^^^^^^^^^ write access through (root of the allocation) at ALLOC[0x0] 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) diff --git a/src/tools/miri/tests/fail/tree_borrows/alternate-read-write.stderr b/src/tools/miri/tests/fail/tree_borrows/alternate-read-write.stderr index 58d22c5641f..98371cbe7a2 100644 --- a/src/tools/miri/tests/fail/tree_borrows/alternate-read-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/alternate-read-write.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/alternate-read-write.rs:LL:CC | LL | *y += 1; // Failure - | ^^^^^^^ write access through is forbidden + | ^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/tree_borrows/children-can-alias.uniq.stderr b/src/tools/miri/tests/fail/tree_borrows/children-can-alias.uniq.stderr index be85e1a1cee..cc1fea30f53 100644 --- a/src/tools/miri/tests/fail/tree_borrows/children-can-alias.uniq.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/children-can-alias.uniq.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/children-can-alias.rs:LL:CC | LL | child2.write(2); - | ^^^^^^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/tree_borrows/error-range.stderr b/src/tools/miri/tests/fail/tree_borrows/error-range.stderr index a03869f33bb..37f0b9b62b0 100644 --- a/src/tools/miri/tests/fail/tree_borrows/error-range.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/error-range.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: read access through is forbidden +error: Undefined Behavior: read access through at ALLOC[0x5] is forbidden --> $DIR/error-range.rs:LL:CC | LL | rmut[5] += 1; - | ^^^^^^^^^^^^ read access through is forbidden + | ^^^^^^^^^^^^ read access through at ALLOC[0x5] 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 is a child of the conflicting tag diff --git a/src/tools/miri/tests/fail/tree_borrows/fnentry_invalidation.stderr b/src/tools/miri/tests/fail/tree_borrows/fnentry_invalidation.stderr index 7df6cd9d923..dd5d27107fe 100644 --- a/src/tools/miri/tests/fail/tree_borrows/fnentry_invalidation.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/fnentry_invalidation.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/fnentry_invalidation.rs:LL:CC | LL | *z = 2; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 has state Frozen which forbids this child write access 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 5644862d23e..715228028bc 100644 --- a/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/outside-range.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x3] is forbidden --> $DIR/outside-range.rs:LL:CC | LL | *y.add(3) = 42; - | ^^^^^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^^^^^ write access through at ALLOC[0x3] 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 is foreign to the protected tag (i.e., it is not a child) diff --git a/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr b/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr index a9d5b0a68c1..87844ff4011 100644 --- a/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/parent_read_freezes_raw_mut.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/parent_read_freezes_raw_mut.rs:LL:CC | LL | *ptr = 0; - | ^^^^^^^^ write access through is forbidden + | ^^^^^^^^ write access through at ALLOC[0x0] 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 has state Frozen which forbids this child write access 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 32cf1c18cde..84fbc91e686 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/pass_invalid_mut.rs:LL:CC | LL | *nope = 31; - | ^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag 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 ba6c30cf935..7d000ba55e6 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 @@ -8,11 +8,11 @@ Warning: this tree is indicative only. Some tags may have been hidden. | RsM | │ └──── Strongly protected | RsM | └──── ────────────────────────────────────────────────── -error: Undefined Behavior: write access through (y, callee:y, caller:y) is forbidden +error: Undefined Behavior: write access through (y, callee:y, caller:y) at ALLOC[0x0] is forbidden --> $DIR/cell-protected-write.rs:LL:CC | LL | *y = 1; - | ^^^^^^ write access through (y, callee:y, caller:y) is forbidden + | ^^^^^^ write access through (y, callee:y, caller:y) at ALLOC[0x0] 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 (y, callee:y, caller:y) is foreign to the protected tag (callee:x) (i.e., it is not a child) 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 16081871d94..41559587bda 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 @@ -8,11 +8,11 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Rs | │ └──── Strongly protected | Rs | └──── ────────────────────────────────────────────────── -error: Undefined Behavior: write access through (y, callee:y, caller:y) is forbidden +error: Undefined Behavior: write access through (y, callee:y, caller:y) at ALLOC[0x0] is forbidden --> $DIR/int-protected-write.rs:LL:CC | LL | *y = 0; - | ^^^^^^ write access through (y, callee:y, caller:y) is forbidden + | ^^^^^^ write access through (y, callee:y, caller:y) at ALLOC[0x0] 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 (y, callee:y, caller:y) is foreign to the protected tag (callee:x) (i.e., it is not a child) diff --git a/src/tools/miri/tests/fail/tree_borrows/return_invalid_mut.stderr b/src/tools/miri/tests/fail/tree_borrows/return_invalid_mut.stderr index dff2374ba9f..ca8c45d36f9 100644 --- a/src/tools/miri/tests/fail/tree_borrows/return_invalid_mut.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/return_invalid_mut.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x4] is forbidden --> $DIR/return_invalid_mut.rs:LL:CC | LL | *ret = 3; - | ^^^^^^^^ write access through is forbidden + | ^^^^^^^^ write access through at ALLOC[0x4] 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 is a child of the conflicting tag 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 ae61fc030f6..f3934d4cbe5 100644 --- a/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr @@ -11,11 +11,11 @@ Thread 2 executing: ret x Thread 2 executing: write y Thread 1 executing: write y Thread 1 executing: ret y -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/spurious_read.rs:LL:CC | LL | *y = 2; - | ^^^^^^ write access through is forbidden + | ^^^^^^ write access through at ALLOC[0x0] 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 has state Reserved (conflicted) which forbids this child write access 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 4793c287045..f0afcc7b3ff 100644 --- a/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/strongly-protected.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: deallocation through is forbidden +error: Undefined Behavior: deallocation through at ALLOC[0x0] is forbidden --> RUSTLIB/alloc/src/alloc.rs:LL:CC | LL | unsafe { __rust_dealloc(ptr, layout.size(), layout.align()) } - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocation through is forbidden + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ deallocation through at ALLOC[0x0] 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 allocation of the accessed tag also contains the strongly protected tag diff --git a/src/tools/miri/tests/fail/tree_borrows/unique.default.stderr b/src/tools/miri/tests/fail/tree_borrows/unique.default.stderr index f058c61ec3b..bce8cb011f6 100644 --- a/src/tools/miri/tests/fail/tree_borrows/unique.default.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/unique.default.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/unique.rs:LL:CC | LL | *uniq.as_ptr() = 3; - | ^^^^^^^^^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] 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 has state Frozen which forbids this child write access diff --git a/src/tools/miri/tests/fail/tree_borrows/unique.uniq.stderr b/src/tools/miri/tests/fail/tree_borrows/unique.uniq.stderr index ba53a87f84a..7323cd1c5ad 100644 --- a/src/tools/miri/tests/fail/tree_borrows/unique.uniq.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/unique.uniq.stderr @@ -1,8 +1,8 @@ -error: Undefined Behavior: write access through is forbidden +error: Undefined Behavior: write access through at ALLOC[0x0] is forbidden --> $DIR/unique.rs:LL:CC | LL | *uniq.as_ptr() = 2; - | ^^^^^^^^^^^^^^^^^^ write access through is forbidden + | ^^^^^^^^^^^^^^^^^^ write access through at ALLOC[0x0] 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 is a child of the conflicting tag 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 35087b11468..87589299cb1 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 @@ -1,8 +1,8 @@ -error: Undefined Behavior: reborrow through is forbidden +error: Undefined Behavior: reborrow through at ALLOC[0x0] is forbidden --> $DIR/write-during-2phase.rs:LL:CC | LL | fn add(&mut self, n: u64) -> u64 { - | ^^^^^^^^^ reborrow through is forbidden + | ^^^^^^^^^ reborrow through at ALLOC[0x0] 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 has state Disabled which forbids this reborrow (acting as a child read access)