-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #2922 - Vanille-N:tb-tests, r=RalfJung
TB: `box_exclusive_violation1` moved to `both_borrows` `box_noalias_violation` was already shared, it makes sense to test `box_exclusive_violation` with TB too.
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
42 changes: 42 additions & 0 deletions
42
src/tools/miri/tests/fail/both_borrows/box_exclusive_violation1.tree.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
error: Undefined Behavior: write access through <TAG> is forbidden | ||
--> $DIR/box_exclusive_violation1.rs:LL:CC | ||
| | ||
LL | *LEAK = 7; | ||
| ^^^^^^^^^ write 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 this child write access | ||
help: the accessed tag <TAG> was created here | ||
--> $DIR/box_exclusive_violation1.rs:LL:CC | ||
| | ||
LL | fn unknown_code_1(x: &i32) { | ||
| ^ | ||
help: the conflicting tag <TAG> was created here, in the initial state Frozen | ||
--> $DIR/box_exclusive_violation1.rs:LL:CC | ||
| | ||
LL | unknown_code_1(&*our); | ||
| ^^^^^ | ||
help: the conflicting tag <TAG> later transitioned to Disabled due to a foreign write access at offsets [0x0..0x4] | ||
--> $DIR/box_exclusive_violation1.rs:LL:CC | ||
| | ||
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 $DIR/box_exclusive_violation1.rs:LL:CC | ||
note: inside `demo_box_advanced_unique` | ||
--> $DIR/box_exclusive_violation1.rs:LL:CC | ||
| | ||
LL | unknown_code_2(); | ||
| ^^^^^^^^^^^^^^^^ | ||
note: inside `main` | ||
--> $DIR/box_exclusive_violation1.rs:LL:CC | ||
| | ||
LL | demo_box_advanced_unique(Box::new(0)); | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace | ||
|
||
error: aborting due to previous error | ||
|