|
| 1 | +Without spurious write |
| 2 | +Thread 1 executing: start |
| 3 | +Thread 2 executing: start |
| 4 | +Thread 2 executing: retag x (&mut, protect) |
| 5 | +Thread 1 executing: retag x (&mut, protect) |
| 6 | +Thread 1 executing: [lazy] retag y (&mut, protect, IM) |
| 7 | +Thread 2 executing: [lazy] retag y (&mut, protect, IM) |
| 8 | +Thread 2 executing: spurious write x |
| 9 | +Thread 1 executing: spurious write x (skipped) |
| 10 | +Thread 1 executing: ret y |
| 11 | +Thread 2 executing: ret y |
| 12 | +Thread 2 executing: ret x |
| 13 | +Thread 1 executing: ret x |
| 14 | +Thread 1 executing: write y |
| 15 | +Thread 2 executing: write y |
| 16 | +error: Undefined Behavior: write access through <TAG> at ALLOC[0x0] is forbidden |
| 17 | + --> $DIR/reservedim_spurious_write.rs:LL:CC |
| 18 | + | |
| 19 | +LL | unsafe { *y.wrapping_sub(1) = 13 } |
| 20 | + | ^^^^^^^^^^^^^^^^^^^^^^^ write access through <TAG> at ALLOC[0x0] is forbidden |
| 21 | + | |
| 22 | + = help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental |
| 23 | + = help: the accessed tag <TAG> has state Disabled which forbids this child write access |
| 24 | +help: the accessed tag <TAG> was created here, in the initial state Reserved |
| 25 | + --> $DIR/reservedim_spurious_write.rs:LL:CC |
| 26 | + | |
| 27 | +LL | fn inner(y: &mut Cell<u8>, b: IdxBarrier) -> *mut u8 { |
| 28 | + | ^ |
| 29 | +help: the accessed tag <TAG> later transitioned to Disabled due to a protector release (acting as a foreign write access) on every location previously accessed by this tag |
| 30 | + --> $DIR/reservedim_spurious_write.rs:LL:CC |
| 31 | + | |
| 32 | +LL | } |
| 33 | + | ^ |
| 34 | + = help: this transition corresponds to a loss of read and write permissions |
| 35 | + = note: BACKTRACE (of the first span) on thread `unnamed-ID`: |
| 36 | + = note: inside closure at $DIR/reservedim_spurious_write.rs:LL:CC |
| 37 | + |
| 38 | +note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace |
| 39 | + |
| 40 | +error: aborting due to 1 previous error |
| 41 | + |
0 commit comments