You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (2) just happened here
2
+
--> $DIR/retag_data_race_write.rs:LL:CC
3
+
|
4
+
LL | *p = 5;
5
+
| ^^^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (2) just happened here
6
+
|
7
+
help: and (1) occurred earlier here
8
+
--> $DIR/retag_data_race_write.rs:LL:CC
9
+
|
10
+
LL | let _r = &mut *p;
11
+
| ^^^^^^^
12
+
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
13
+
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
14
+
= note: BACKTRACE (of the first span):
15
+
= note: inside `thread_2` at $DIR/retag_data_race_write.rs:LL:CC
16
+
note: inside closure
17
+
--> $DIR/retag_data_race_write.rs:LL:CC
18
+
|
19
+
LL | let t2 = std::thread::spawn(move || thread_2(p));
20
+
| ^^^^^^^^^^^
21
+
22
+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
Copy file name to clipboardExpand all lines: src/tools/miri/tests/fail/stacked_borrows/retag_data_race_read.stack.stderr
+10-10
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,23 @@
1
1
error: Undefined Behavior: Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (2) just happened here
2
-
--> $DIR/retag-data-race.rs:LL:CC
2
+
--> $DIR/retag_data_race_read.rs:LL:CC
3
3
|
4
-
LL | *p = 5;
5
-
| ^^^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (2) just happened here
4
+
LL | *p = 5;
5
+
| ^^^^^^ Data race detected between (1) Read on thread `<unnamed>` and (2) Write on thread `<unnamed>` at ALLOC. (2) just happened here
6
6
|
7
7
help: and (1) occurred earlier here
8
-
--> $DIR/retag-data-race.rs:LL:CC
8
+
--> $DIR/retag_data_race_read.rs:LL:CC
9
9
|
10
-
LL | let _r = &*p;
11
-
| ^^^
10
+
LL | let _r = &*p;
11
+
| ^^^
12
12
= help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
13
13
= help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
14
14
= note: BACKTRACE (of the first span):
15
-
= note: inside `thread_2` at $DIR/retag-data-race.rs:LL:CC
15
+
= note: inside `thread_2` at $DIR/retag_data_race_read.rs:LL:CC
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ reborrow through <TAG> (root of the allocation) is forbidden
6
+
|
7
+
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Tree Borrows rules it violated are still experimental
8
+
= help: the accessed tag <TAG> (root of the allocation) is foreign to the protected tag <TAG> (i.e., it is not a child)
9
+
= help: this reborrow (acting as a foreign read access) would cause the protected tag <TAG> (currently Active) to become Disabled
0 commit comments