make strict-provenance imply check-number-validity
This commit is contained in:
parent
732461b4cd
commit
1d79b60a1e
@ -297,7 +297,8 @@ environment variable:
|
||||
* `-Zmiri-strict-provenance` enables [strict
|
||||
provenance](https://github.com/rust-lang/rust/issues/95228) checking in Miri. This means that
|
||||
casting an integer to a pointer yields a result with 'invalid' provenance, i.e., with provenance
|
||||
that cannot be used for any memory access. Also implies `-Zmiri-tag-raw-pointers`.
|
||||
that cannot be used for any memory access. Also implies `-Zmiri-tag-raw-pointers` and
|
||||
`-Zmiri-check-number-validity`.
|
||||
* `-Zmiri-symbolic-alignment-check` makes the alignment check more strict. By
|
||||
default, alignment is checked by casting the pointer to an integer, and making
|
||||
sure that is a multiple of the alignment. This can lead to cases where a
|
||||
|
@ -366,6 +366,7 @@ fn main() {
|
||||
"-Zmiri-strict-provenance" => {
|
||||
miri_config.strict_provenance = true;
|
||||
miri_config.tag_raw = true;
|
||||
miri_config.check_number_validity = true;
|
||||
}
|
||||
"-Zmiri-track-raw-pointers" => {
|
||||
eprintln!(
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
#![feature(btree_drain_filter)]
|
||||
use std::collections::{BTreeMap, BTreeSet};
|
||||
use std::mem;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// ignore-windows: Concurrency on Windows is not supported yet.
|
||||
// compile-flags: -Zmiri-disable-isolation -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-disable-isolation -Zmiri-strict-provenance
|
||||
|
||||
use std::sync::{Arc, Barrier, Condvar, Mutex, Once, RwLock};
|
||||
use std::thread;
|
||||
|
@ -1,5 +1,5 @@
|
||||
// ignore-windows: Concurrency on Windows is not supported yet.
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
|
||||
//! The main purpose of this test is to check that if we take a pointer to
|
||||
//! thread's `t1` thread-local `A` and send it to another thread `t2`,
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
#![feature(new_uninit)]
|
||||
#![feature(get_mut_unchecked)]
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
#![feature(new_uninit)]
|
||||
#![feature(slice_as_chunks)]
|
||||
#![feature(slice_partition_dedup)]
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
|
||||
fn empty() -> &'static str {
|
||||
""
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
// Gather all references from a mutable iterator and make sure Miri notices if
|
||||
// using them is dangerous.
|
||||
fn test_all_refs<'a, T: 'a>(dummy: &mut T, iter: impl Iterator<Item = &'a mut T>) {
|
||||
|
@ -1,4 +1,4 @@
|
||||
// compile-flags: -Zmiri-strict-provenance -Zmiri-check-number-validity
|
||||
// compile-flags: -Zmiri-strict-provenance
|
||||
use std::collections::VecDeque;
|
||||
|
||||
fn test_all_refs<'a, T: 'a>(dummy: &mut T, iter: impl Iterator<Item = &'a mut T>) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user