about summary refs log tree commit diff
path: root/src/tools/miri/tests/fail/tree_borrows/spurious_read.stderr
blob: 8f2534d6b6e976ee424002ed5c01e318633f9c03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Thread 1 executing: start
Thread 2 executing: start
Thread 2 executing: retag x (&mut, protect)
Thread 1 executing: retag x (&mut, protect)
Thread 1 executing: retag y (&mut, protect)
Thread 2 executing: retag y (&mut, protect)
Thread 2 executing: location where spurious read of x would happen in the target
Thread 1 executing: location where spurious read of x would happen in the target
Thread 1 executing: ret x
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 <TAG> at ALLOC[0x0] is forbidden
  --> tests/fail/tree_borrows/spurious_read.rs:LL:CC
   |
LL |                 *y = 2;
   |                 ^^^^^^ Undefined Behavior occurred here
   |
   = 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: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/tree-borrows.md for further information
   = help: the accessed tag <TAG> has state Reserved (conflicted) which forbids this child write access
help: the accessed tag <TAG> was created here, in the initial state Reserved
  --> tests/fail/tree_borrows/spurious_read.rs:LL:CC
   |
LL |         fn as_mut(y: &mut u8, b: (usize, Arc<Barrier>)) -> *mut u8 {
   |                   ^
help: the accessed tag <TAG> later transitioned to Reserved (conflicted) due to a protector release (acting as a foreign read access) on every location previously accessed by this tag
  --> tests/fail/tree_borrows/spurious_read.rs:LL:CC
   |
LL |         }
   |          ^
   = help: this transition corresponds to a temporary loss of write permissions until function exit
   = note: BACKTRACE (of the first span) on thread `unnamed-ID`:
   = note: inside `retagx_retagy_retx_writey_rety::{closure#1}::as_mut` at tests/fail/tree_borrows/spurious_read.rs:LL:CC
note: inside closure
  --> tests/fail/tree_borrows/spurious_read.rs:LL:CC
   |
LL |         let _y = as_mut(unsafe { &mut *ptr.0 }, b.clone());
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace

error: aborting due to 1 previous error