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
(None, format!("this program is using integer-to-pointer casts or (equivalently) `from_exposed_addr`,")),
475
-
(None, format!("which means that Miri might miss pointer bugs in this program")),
476
-
(None, format!("see https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation")),
477
-
(None, format!("to ensure that Miri does not miss bugs in your program, use `with_addr` (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) instead")),
478
-
(None, format!("you can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics")),
479
-
(None, format!("alternatively, the `-Zmiri-permissive-provenance` flag disables this warning")),
483
+
(None, format!("This program is using integer-to-pointer casts or (equivalently) `ptr::from_exposed_addr`,")),
484
+
(None, format!("which means that Miri might miss pointer bugs in this program.")),
485
+
(None, format!("See https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation.")),
486
+
(None, format!("To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.")),
487
+
(None, format!("You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics.")),
488
+
(None, format!("Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.")),
Copy file name to clipboardExpand all lines: tests/fail/provenance/strict_provenance_cast.stderr
+3-3
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,10 @@
1
-
error: unsupported operation: integer-to-pointer casts and `from_exposed_addr` are not supported with `-Zmiri-strict-provenance`; use `with_addr` instead
1
+
error: unsupported operation: integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
2
2
--> $DIR/strict_provenance_cast.rs:LL:CC
3
3
|
4
4
LL | let _ptr = addr as *const i32;
5
-
| ^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `from_exposed_addr` are not supported with `-Zmiri-strict-provenance`; use `with_addr` instead
5
+
| ^^^^^^^^^^^^^^^^^^ integer-to-pointer casts and `ptr::from_exposed_addr` are not supported with `-Zmiri-strict-provenance`
6
6
|
7
-
= help: this is likely not a bug in the program; it indicates that the program performed an operation that the interpreter does not support
7
+
= help: use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead
8
8
9
9
= note: inside `main` at $DIR/strict_provenance_cast.rs:LL:CC
= help: this program is using integer-to-pointer casts or (equivalently) `from_exposed_addr`,
8
-
= help: which means that Miri might miss pointer bugs in this program
9
-
= help: see https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation
10
-
= help: to ensure that Miri does not miss bugs in your program, use `with_addr` (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) instead
11
-
= help: you can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics
12
-
= help: alternatively, the `-Zmiri-permissive-provenance` flag disables this warning
7
+
= help: This program is using integer-to-pointer casts or (equivalently) `ptr::from_exposed_addr`,
8
+
= help: which means that Miri might miss pointer bugs in this program.
9
+
= help: See https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation.
10
+
= help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.
11
+
= help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics.
12
+
= help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.
LL | let x: &Foo = unsafe { &*(16 as *const Foo) };
5
5
| ^^^^^^^^^^^^^^^^^^ integer-to-pointer cast
6
6
|
7
-
= help: this program is using integer-to-pointer casts or (equivalently) `from_exposed_addr`,
8
-
= help: which means that Miri might miss pointer bugs in this program
9
-
= help: see https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation
10
-
= help: to ensure that Miri does not miss bugs in your program, use `with_addr` (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance) instead
11
-
= help: you can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics
12
-
= help: alternatively, the `-Zmiri-permissive-provenance` flag disables this warning
7
+
= help: This program is using integer-to-pointer casts or (equivalently) `ptr::from_exposed_addr`,
8
+
= help: which means that Miri might miss pointer bugs in this program.
9
+
= help: See https://doc.rust-lang.org/nightly/std/ptr/fn.from_exposed_addr.html for more details on that operation.
10
+
= help: To ensure that Miri does not miss bugs in your program, use Strict Provenance APIs (https://doc.rust-lang.org/nightly/std/ptr/index.html#strict-provenance, https://crates.io/crates/sptr) instead.
11
+
= help: You can then pass the `-Zmiri-strict-provenance` flag to Miri, to ensure you are not relying on `from_exposed_addr` semantics.
12
+
= help: Alternatively, the `-Zmiri-permissive-provenance` flag disables this warning.
13
13
14
14
= note: inside `main` at $DIR/extern_types.rs:LL:CC
0 commit comments