bors 732461b4cd Auto merge of #2045 - RalfJung:strict-provenance, r=RalfJung
add -Zmiri-strict-provenance

This implements [strict provenance](https://github.com/rust-lang/rust/issues/95228) in Miri. The only change is that casting an integer to a pointer does not even attempt to produce a good provenance for the given address; instead, it always uses the invalid provenance. This stricter than even `-Zmiri-tag-raw-pointers` in that it also rejects the following example (which does not even involve Stacked Borrows):
```rust
fn main() {
    let x = 22;
    let ptr = &x as *const _ as *const u8;
    let roundtrip = ptr as usize as *const u8;
    let _ = unsafe { roundtrip.offset(1) };
}
```
The new flag also implies `-Zmiri-tag-raw-pointers` since the only reason one would *not* want to tag raw pointers is to support ptr-int-ptr roundtrips.

Note that the flag does *not* check against ptr-to-int *transmutes*; that still requires `-Zmiri-check-number-validity`. You can also check for strict provenance *without* Stacked Borrows by adding `-Zmiri-disable-stacked-borrows`.

The new "Miri hard mode" flags for maximal checking are `-Zmiri-strict-provenance -Zmiri-check-number-validity`. (Add `-Zmiri-symbolic-alignment-check` if you feel extra spicy today.)
2022-04-01 22:40:26 +00:00
..
2022-04-01 14:10:24 -04:00
2021-07-07 09:33:01 +02:00
2021-12-05 20:33:20 -05:00
2020-03-30 10:23:16 +02:00
2019-02-26 18:37:45 +00:00
2021-03-02 20:17:05 +05:30
2022-03-05 17:26:32 -05:00
2020-11-19 09:21:11 +01:00
2021-06-20 15:12:11 +08:00
2020-09-10 08:44:27 +02:00
2019-02-26 18:37:45 +00:00
2020-10-29 20:57:38 +01:00
2020-10-27 17:26:36 +01:00
2022-04-01 14:10:24 -04:00
2021-05-11 15:32:05 +02:00
2019-11-25 15:08:47 +01:00
2019-02-26 18:37:45 +00:00
2019-02-26 18:37:45 +00:00
2020-10-29 20:57:38 +01:00
2019-09-20 08:53:35 +02:00
2020-03-27 08:43:08 -04:00
2020-03-06 08:21:53 -05:00
2019-04-21 12:36:17 +02:00
2019-11-25 15:08:47 +01:00
2021-04-25 16:57:48 +02:00
2022-03-20 10:36:27 -04:00
2020-10-04 12:06:51 -04:00
2020-10-04 12:06:51 -04:00
2022-02-25 12:06:10 -05:00
2020-09-10 08:44:27 +02:00
2020-05-20 00:00:35 +02:00
2022-03-31 11:20:24 -04:00
2019-02-26 18:37:45 +00:00
2020-01-19 10:03:18 -06:00
2019-02-26 18:37:45 +00:00
2020-01-19 10:03:18 -06:00
2019-02-26 18:37:45 +00:00
2019-02-26 18:37:45 +00:00
2019-06-30 15:31:14 +01:00
2019-02-26 18:37:45 +00:00
2021-01-31 13:12:25 +01:00
2021-12-15 19:11:08 +01:00
2022-02-27 15:27:34 -05:00
2019-11-08 12:43:26 +01:00
2020-09-02 20:57:20 -05:00
2020-09-10 08:44:27 +02:00
2019-08-04 16:44:32 -04:00
2021-04-30 19:35:59 +08:00
2021-01-31 13:12:25 +01:00
2020-03-22 08:55:39 +01:00
2021-01-31 13:12:25 +01:00
2022-04-01 14:10:24 -04:00
2019-02-26 18:37:45 +00:00
2020-06-20 11:48:42 +02:00
2021-09-02 15:41:10 -07:00
2021-09-02 15:41:10 -07:00
2022-04-01 14:10:24 -04:00
2020-01-19 10:03:18 -06:00
2020-09-07 15:05:26 -05:00
2021-10-12 11:39:06 -04:00
2021-04-25 16:57:48 +02:00
2022-04-01 14:10:24 -04:00
2022-04-01 14:10:24 -04:00
2019-02-15 10:41:12 +01:00
2020-06-01 01:12:31 +02:00