about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-12-01 20:14:04 -0800
committerScott McMurray <scottmcm@users.noreply.github.com>2024-12-03 11:05:45 -0800
commit612adbb6bf88ecf549fb93cb1f4edcf793bca88e (patch)
tree3f37a1552ccefe3df0da67281b5e060bcc2d3d21 /src
parent490b2cc09860dd62a7595bb07364d71c12ce4e60 (diff)
Bounds-check with PtrMetadata instead of Len in MIR
Diffstat (limited to 'src')
-rw-r--r--src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.rs2
-rw-r--r--src/tools/miri/tests/fail/both_borrows/buggy_as_mut_slice.stack.stderr8
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 6d535a14c04..6027b5c0f5f 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: /write access .* tag does not exist in the borrow stack/
+    //~[stack]^ ERROR: /trying to retag .+ for SharedReadOnly permission .+ tag does not exist in the borrow stack for this location/
     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 4e5355f5653..c5488a537a2 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: attempting a write access using <TAG> at ALLOC[0x4], but that tag does not exist in the borrow stack for this location
+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
   --> tests/fail/both_borrows/buggy_as_mut_slice.rs:LL:CC
    |
 LL |     v1[1] = 5;
-   |     ^^^^^^^^^
+   |     ^^^^^
    |     |
-   |     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]
+   |     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]
    |
    = 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