diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-12-13 02:00:20 -0800 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-12-13 02:00:20 -0800 |
| commit | 38249be509101e87ea4ac10951b1b4ce554f1cc0 (patch) | |
| tree | 9e090fcb0ebad1290811af2cc560604c3cdbb80d /src | |
| parent | 612adbb6bf88ecf549fb93cb1f4edcf793bca88e (diff) | |
Don't retag the `PtrMetadata(&raw const *_n)` in slice indexing
Diffstat (limited to 'src')
| -rw-r--r-- | src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.rs | 2 | ||||
| -rw-r--r-- | src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.rs b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.rs index 6027b5c0f5f..6d535a14c04 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.rs +++ b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.rs @@ -13,7 +13,7 @@ fn main() { let v1 = safe::as_mut_slice(&v); let v2 = safe::as_mut_slice(&v); v1[1] = 5; - //~[stack]^ ERROR: /trying to retag .+ for SharedReadOnly permission .+ tag does not exist in the borrow stack for this location/ + //~[stack]^ ERROR: /write access .* tag does not exist in the borrow stack/ v2[1] = 7; //~[tree]^ ERROR: /write access through .* is forbidden/ } diff --git a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr index c5488a537a2..4e5355f5653 100644 --- a/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr +++ b/src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr @@ -1,11 +1,11 @@ -error: Undefined Behavior: trying to retag from <TAG> for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location +error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x4], but that tag does not exist in the borrow stack for this location --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC | LL | v1[1] = 5; - | ^^^^^ + | ^^^^^^^^^ | | - | trying to retag from <TAG> for SharedReadOnly permission at ALLOC[0x0], but that tag does not exist in the borrow stack for this location - | this error occurs as part of retag at ALLOC[0x0..0xc] + | attempting a write access using <TAG> at ALLOC[0x4], but that tag does not exist in the borrow stack for this location + | this error occurs as part of an access at ALLOC[0x4..0x8] | = help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental = help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information |
