summaryrefslogtreecommitdiff
path: root/src/tools/miri/tests/fail/tree-borrows/error-range.stderr
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/miri/tests/fail/tree-borrows/error-range.stderr')
-rw-r--r--src/tools/miri/tests/fail/tree-borrows/error-range.stderr44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/tools/miri/tests/fail/tree-borrows/error-range.stderr b/src/tools/miri/tests/fail/tree-borrows/error-range.stderr
new file mode 100644
index 00000000000..bc829fd86d3
--- /dev/null
+++ b/src/tools/miri/tests/fail/tree-borrows/error-range.stderr
@@ -0,0 +1,44 @@
+error: Undefined Behavior: read access through <TAG> is forbidden
+ --> $DIR/error-range.rs:LL:CC
+ |
+LL | rmut[5] += 1;
+ | ^^^^^^^^^^^^ read access through <TAG> 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 <TAG> is a child of the conflicting tag <TAG>
+ = help: the conflicting tag <TAG> has state Disabled which forbids child read accesses
+help: the accessed tag <TAG> was created here
+ --> $DIR/error-range.rs:LL:CC
+ |
+LL | let rmut = &mut *addr_of_mut!(data[0..6]);
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+help: the conflicting tag <TAG> was created here, in the initial state Reserved
+ --> $DIR/error-range.rs:LL:CC
+ |
+LL | let rmut = &mut *addr_of_mut!(data[0..6]);
+ | ^^^^
+help: the conflicting tag <TAG> then transitioned from Reserved to Active due to a child write access at offsets [0x5..0x6]
+ --> $DIR/error-range.rs:LL:CC
+ |
+LL | rmut[5] += 1;
+ | ^^^^^^^^^^^^
+ = help: this corresponds to an activation
+help: the conflicting tag <TAG> then transitioned from Active to Frozen due to a foreign read access at offsets [0x5..0x6]
+ --> $DIR/error-range.rs:LL:CC
+ |
+LL | let _v = data[5];
+ | ^^^^^^^
+ = help: this corresponds to a loss of write permissions
+help: the conflicting tag <TAG> then transitioned from Frozen to Disabled due to a foreign write access at offsets [0x5..0x6]
+ --> $DIR/error-range.rs:LL:CC
+ |
+LL | data[5] = 1;
+ | ^^^^^^^^^^^
+ = help: this corresponds to a loss of read permissions
+ = note: BACKTRACE (of the first span):
+ = note: inside `main` at $DIR/error-range.rs:LL:CC
+
+note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
+
+error: aborting due to previous error
+