diff options
12 files changed, 54 insertions, 52 deletions
diff --git a/src/tools/miri/tests/compiletest.rs b/src/tools/miri/tests/compiletest.rs index 59143550253..70a15b3fc93 100644 --- a/src/tools/miri/tests/compiletest.rs +++ b/src/tools/miri/tests/compiletest.rs @@ -190,6 +190,8 @@ regexes! { // erase borrow tags "<[0-9]+>" => "<TAG>", "<[0-9]+=" => "<TAG=", + // normalize width of Tree Borrows diagnostic borders (which otherwise leak borrow tag info) + "(─{50})─+" => "$1", // erase whitespace that differs between platforms r" +at (.*\.rs)" => " at $1", // erase generics in backtraces diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr index 5e910779621..c77f1492a97 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/cell-protected-write.stderr @@ -1,4 +1,4 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -7,7 +7,7 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Re*| │ └─┬──<TAG=caller:x> | Re*| │ └────<TAG=callee:x> Strongly protected | Re*| └────<TAG=y, callee:y, caller:y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── error: Undefined Behavior: write access through <TAG> (y, callee:y, caller:y) is forbidden --> $DIR/cell-protected-write.rs:LL:CC | diff --git a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr index e28aac306cd..ac8788112e9 100644 --- a/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr +++ b/src/tools/miri/tests/fail/tree_borrows/reserved/int-protected-write.stderr @@ -1,4 +1,4 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -7,7 +7,7 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Res| │ └─┬──<TAG=caller:x> | Res| │ └────<TAG=callee:x> Strongly protected | Res| └────<TAG=y, callee:y, caller:y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── error: Undefined Behavior: write access through <TAG> (y, callee:y, caller:y) is forbidden --> $DIR/int-protected-write.rs:LL:CC | diff --git a/src/tools/miri/tests/pass/tree_borrows/cell-alternate-writes.stderr b/src/tools/miri/tests/pass/tree_borrows/cell-alternate-writes.stderr index 1eab4685a35..f464e0b4f49 100644 --- a/src/tools/miri/tests/pass/tree_borrows/cell-alternate-writes.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/cell-alternate-writes.stderr @@ -1,12 +1,12 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Re*| └────<TAG=data, x, y> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └────<TAG=data, x, y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/end-of-protector.stderr b/src/tools/miri/tests/pass/tree_borrows/end-of-protector.stderr index c20da1a593f..265f6dfc9c8 100644 --- a/src/tools/miri/tests/pass/tree_borrows/end-of-protector.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/end-of-protector.stderr @@ -1,11 +1,11 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Res| └─┬──<TAG=data> | Res| └────<TAG=x> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -13,8 +13,8 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Res| └─┬──<TAG=x> | Res| └─┬──<TAG=caller:x> | Res| └────<TAG=callee:x> Strongly protected -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -23,8 +23,8 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Res| │ └─┬──<TAG=caller:x> | Res| │ └────<TAG=callee:x> | Res| └────<TAG=y> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -33,4 +33,4 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Dis| │ └─┬──<TAG=caller:x> | Dis| │ └────<TAG=callee:x> | Act| └────<TAG=y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/formatting.stderr b/src/tools/miri/tests/pass/tree_borrows/formatting.stderr index effd0d9f961..673dae6210d 100644 --- a/src/tools/miri/tests/pass/tree_borrows/formatting.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/formatting.stderr @@ -1,4 +1,4 @@ -─────────────────────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1.. 2.. 10.. 11..100..101..1000..1001..1024 | Act| Act| Act| Act| Act| Act| Act| Act| Act| └─┬──<TAG=root of the allocation> @@ -7,8 +7,8 @@ Warning: this tree is indicative only. Some tags may have been hidden. |----|----|----| Act|----|?Dis| ----| ?Dis| ----| ├────<TAG=data[10]> |----|----|----|----|----| Frz| ----| ?Dis| ----| ├────<TAG=data[100]> |----|----|----|----|----|----| ----| Act| ----| └────<TAG=data[1000]> -─────────────────────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -28,4 +28,4 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Frz| └─┬──<TAG=xcb> | Frz| ├────<TAG=xcba> | Frz| └────<TAG=xcbb> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/reborrow-is-read.stderr b/src/tools/miri/tests/pass/tree_borrows/reborrow-is-read.stderr index 8c4323b2f7f..b23d78a7156 100644 --- a/src/tools/miri/tests/pass/tree_borrows/reborrow-is-read.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/reborrow-is-read.stderr @@ -1,15 +1,15 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=parent> | Act| └────<TAG=x> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=parent> | Frz| ├────<TAG=x> | Res| └────<TAG=y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/reserved.stderr b/src/tools/miri/tests/pass/tree_borrows/reserved.stderr index afb91700222..691fe8b7744 100644 --- a/src/tools/miri/tests/pass/tree_borrows/reserved.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/reserved.stderr @@ -1,5 +1,5 @@ [interior mut + protected] Foreign Read: Re* -> Frz -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -8,27 +8,27 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Re*| │ └─┬──<TAG=caller:x> | Frz| │ └────<TAG=callee:x> | Re*| └────<TAG=y, caller:y, callee:y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── [interior mut] Foreign Read: Re* -> Re* -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 8 | Act| └─┬──<TAG=root of the allocation> | Re*| └─┬──<TAG=base> | Re*| ├────<TAG=x> | Re*| └────<TAG=y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── [interior mut] Foreign Write: Re* -> Re* -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 8 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=base> | Re*| ├────<TAG=x> | Act| └────<TAG=y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── [protected] Foreign Read: Res -> Frz -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> @@ -37,22 +37,22 @@ Warning: this tree is indicative only. Some tags may have been hidden. | Res| │ └─┬──<TAG=caller:x> | Frz| │ └────<TAG=callee:x> | Res| └────<TAG=y, caller:y, callee:y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── [] Foreign Read: Res -> Res -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Res| └─┬──<TAG=base> | Res| ├────<TAG=x> | Res| └────<TAG=y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── [] Foreign Write: Res -> Dis -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=base> | Dis| ├────<TAG=x> | Act| └────<TAG=y> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/unique.default.stderr b/src/tools/miri/tests/pass/tree_borrows/unique.default.stderr index 11e05d50f2c..f870d3bdec0 100644 --- a/src/tools/miri/tests/pass/tree_borrows/unique.default.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/unique.default.stderr @@ -1,21 +1,21 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Res| └─┬──<TAG=base> | Res| └────<TAG=raw, uniq, uniq> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=base> | Act| └────<TAG=raw, uniq, uniq> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=base> | Act| └────<TAG=raw, uniq, uniq> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/unique.uniq.stderr b/src/tools/miri/tests/pass/tree_borrows/unique.uniq.stderr index 5008b66741a..9ab6b879aa7 100644 --- a/src/tools/miri/tests/pass/tree_borrows/unique.uniq.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/unique.uniq.stderr @@ -1,24 +1,24 @@ -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Res| └─┬──<TAG=base> | Res| └─┬──<TAG=raw> |----| └────<TAG=uniq, uniq> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=base> | Act| └─┬──<TAG=raw> | Act| └────<TAG=uniq, uniq> -────────────────────────────────────────────────────────────────────── -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 1 | Act| └─┬──<TAG=root of the allocation> | Act| └─┬──<TAG=base> | Act| └─┬──<TAG=raw> | Dis| └────<TAG=uniq, uniq> -────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/vec_unique.default.stderr b/src/tools/miri/tests/pass/tree_borrows/vec_unique.default.stderr index f1af1ea3d8b..a7712ae91fb 100644 --- a/src/tools/miri/tests/pass/tree_borrows/vec_unique.default.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/vec_unique.default.stderr @@ -1,6 +1,6 @@ -───────────────────────────────────────────────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 2 | Act| └─┬──<TAG=root of the allocation> | Res| └────<TAG=base.as_ptr(), base.as_ptr(), raw_parts.0, reconstructed.as_ptr(), reconstructed.as_ptr()> -───────────────────────────────────────────────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── diff --git a/src/tools/miri/tests/pass/tree_borrows/vec_unique.uniq.stderr b/src/tools/miri/tests/pass/tree_borrows/vec_unique.uniq.stderr index 00ff1ee00eb..e9f1cb3b1ed 100644 --- a/src/tools/miri/tests/pass/tree_borrows/vec_unique.uniq.stderr +++ b/src/tools/miri/tests/pass/tree_borrows/vec_unique.uniq.stderr @@ -1,8 +1,8 @@ -────────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── Warning: this tree is indicative only. Some tags may have been hidden. 0.. 2 | Act| └─┬──<TAG=root of the allocation> |----| └─┬──<TAG=base.as_ptr(), base.as_ptr()> |----| └─┬──<TAG=raw_parts.0> |----| └────<TAG=reconstructed.as_ptr(), reconstructed.as_ptr()> -────────────────────────────────────────────────────────────────────────── +────────────────────────────────────────────────── |
