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
Copy file name to clipboardExpand all lines: tests/fail/function_calls/return_pointer_aliasing_read.stack.stderr
+5-5
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
error: Undefined Behavior: not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
2
-
--> $DIR/return_pointer_aliasing.rs:LL:CC
2
+
--> $DIR/return_pointer_aliasing_read.rs:LL:CC
3
3
|
4
4
LL | unsafe { ptr.read() };
5
5
| ^^^^^^^^^^ not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
6
6
|
7
7
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
8
8
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
9
9
help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
10
-
--> $DIR/return_pointer_aliasing.rs:LL:CC
10
+
--> $DIR/return_pointer_aliasing_read.rs:LL:CC
11
11
|
12
12
LL | / mir! {
13
13
LL | | {
@@ -18,14 +18,14 @@ LL | | }
18
18
LL | | }
19
19
| |_____^
20
20
help: <TAG> is this argument
21
-
--> $DIR/return_pointer_aliasing.rs:LL:CC
21
+
--> $DIR/return_pointer_aliasing_read.rs:LL:CC
22
22
|
23
23
LL | unsafe { ptr.read() };
24
24
| ^^^^^^^^^^^^^^^^^^^^^
25
25
= note: BACKTRACE (of the first span):
26
-
= note: inside `myfun` at $DIR/return_pointer_aliasing.rs:LL:CC
26
+
= note: inside `myfun` at $DIR/return_pointer_aliasing_read.rs:LL:CC
Copy file name to clipboardExpand all lines: tests/fail/function_calls/return_pointer_aliasing_write.stack.stderr
+10-13
Original file line number
Diff line number
Diff line change
@@ -1,16 +1,13 @@
1
-
error: Undefined Behavior: attempting a write access using <TAG> at ALLOC[0x0], but that tag does not exist in the borrow stack for this location
2
-
--> $DIR/return_pointer_aliasing2.rs:LL:CC
1
+
error: Undefined Behavior: not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
2
+
--> $DIR/return_pointer_aliasing_write.rs:LL:CC
3
3
|
4
4
LL | unsafe { ptr.write(0) };
5
-
| ^^^^^^^^^^^^
6
-
| |
7
-
| attempting a write access using <TAG> at ALLOC[0x0], but that tag does not exist in the borrow stack for this location
8
-
| this error occurs as part of an access at ALLOC[0x0..0x4]
5
+
| ^^^^^^^^^^^^ not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
9
6
|
10
7
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
11
8
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
12
9
help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
13
-
--> $DIR/return_pointer_aliasing2.rs:LL:CC
10
+
--> $DIR/return_pointer_aliasing_write.rs:LL:CC
14
11
|
15
12
LL | / mir! {
16
13
LL | | {
@@ -20,18 +17,18 @@ LL | | let ptr = &raw mut _x;
20
17
LL | | }
21
18
LL | | }
22
19
| |_____^
23
-
help: <TAG> was later invalidated at offsets [0x0..0x4] by a Unique in-place function argument/return passing protection
24
-
--> $DIR/return_pointer_aliasing2.rs:LL:CC
20
+
help: <TAG> is this argument
21
+
--> $DIR/return_pointer_aliasing_write.rs:LL:CC
25
22
|
26
23
LL | unsafe { ptr.write(0) };
27
24
| ^^^^^^^^^^^^^^^^^^^^^^^
28
25
= note: BACKTRACE (of the first span):
29
-
= note: inside `myfun` at $DIR/return_pointer_aliasing2.rs:LL:CC
26
+
= note: inside `myfun` at $DIR/return_pointer_aliasing_write.rs:LL:CC
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
36
33
37
34
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
41
41
42
42
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
error: Undefined Behavior: not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
| ^^^^^^^^^^^^ not granting access to tag <TAG> because that would remove [Unique for <TAG>] which is strongly protected because it is an argument of call ID
6
+
|
7
+
= help: this indicates a potential bug in the program: it performed an invalid operation, but the Stacked Borrows rules it violated are still experimental
8
+
= help: see https://github.com/rust-lang/unsafe-code-guidelines/blob/master/wip/stacked-borrows.md for further information
9
+
help: <TAG> was created by a SharedReadWrite retag at offsets [0x0..0x4]
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
33
+
34
+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
| ^^^^^^^^^^^^ write access through <TAG> (root of the allocation) at ALLOC[0x0] 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 foreign write access would cause the protected tag <TAG> (currently Active) to become Disabled
= note: this error originates in the macro `::core::intrinsics::mir::__internal_remove_let` which comes from the expansion of the macro `mir` (in Nightly builds, run with -Z macro-backtrace for more info)
41
+
42
+
note: some details are omitted, run with `MIRIFLAGS=-Zmiri-backtrace=full` for a verbose backtrace
0 commit comments