Auto merge of #2203 - RalfJung:deprecate, r=oli-obk
deprecate -Zmiri-allow-uninit-numbers and -Zmiri-allow-ptr-int-transmute Cc https://github.com/rust-lang/miri/issues/2187 https://github.com/rust-lang/miri/issues/2188
This commit is contained in:
commit
2bbb70f584
@ -309,13 +309,15 @@ to Miri failing to detect cases of undefined behavior in a program.
|
||||
|
||||
* `-Zmiri-allow-uninit-numbers` disables the check to ensure that number types (integer and float
|
||||
types) always hold initialized data. (They must still be initialized when any actual operation,
|
||||
such as arithmetic, is performed.) Using this flag is **unsound**. This has no effect when
|
||||
such as arithmetic, is performed.) Using this flag is **unsound** and
|
||||
[deprecated](https://github.com/rust-lang/miri/issues/2187). This has no effect when
|
||||
`-Zmiri-disable-validation` is present.
|
||||
* `-Zmiri-allow-ptr-int-transmute` makes Miri more accepting of transmutation between pointers and
|
||||
integers via `mem::transmute` or union/pointer type punning. This has two effects: it disables the
|
||||
check against integers storing a pointer (i.e., data with provenance), thus allowing
|
||||
pointer-to-integer transmutation, and it treats integer-to-pointer transmutation as equivalent to
|
||||
a cast. Using this flag is **unsound**.
|
||||
a cast. Using this flag is **unsound** and
|
||||
[deprecated](https://github.com/rust-lang/miri/issues/2188).
|
||||
* `-Zmiri-disable-abi-check` disables checking [function ABI]. Using this flag
|
||||
is **unsound**.
|
||||
* `-Zmiri-disable-alignment-check` disables checking pointer alignment, so you
|
||||
|
@ -329,8 +329,16 @@ fn main() {
|
||||
since it is now enabled by default"
|
||||
);
|
||||
} else if arg == "-Zmiri-allow-uninit-numbers" {
|
||||
eprintln!(
|
||||
"WARNING: `-Zmiri-allow-uninit-numbers` is deprecated and planned to be removed. \
|
||||
Please let us know at <https://github.com/rust-lang/miri/issues/2187> if you rely on this flag."
|
||||
);
|
||||
miri_config.allow_uninit_numbers = true;
|
||||
} else if arg == "-Zmiri-allow-ptr-int-transmute" {
|
||||
eprintln!(
|
||||
"WARNING: `-Zmiri-allow-ptr-int-transmute` is deprecated and planned to be removed. \
|
||||
Please let us know at <https://github.com/rust-lang/miri/issues/2188> if you rely on this flag."
|
||||
);
|
||||
miri_config.allow_ptr_int_transmute = true;
|
||||
} else if arg == "-Zmiri-disable-abi-check" {
|
||||
miri_config.check_abi = false;
|
||||
|
@ -1,3 +1,4 @@
|
||||
WARNING: `-Zmiri-allow-uninit-numbers` is deprecated and planned to be removed. Please let us know at <https://github.com/rust-lang/miri/issues/2187> if you rely on this flag.
|
||||
error: Undefined Behavior: type validation failed at .<enum-tag>: encountered uninitialized bytes, but expected a valid enum tag
|
||||
--> $DIR/invalid_enum_tag_256variants_uninit.rs:LL:CC
|
||||
|
|
||||
|
1
tests/pass/move-uninit-primval.stderr
Normal file
1
tests/pass/move-uninit-primval.stderr
Normal file
@ -0,0 +1 @@
|
||||
WARNING: `-Zmiri-allow-uninit-numbers` is deprecated and planned to be removed. Please let us know at <https://github.com/rust-lang/miri/issues/2187> if you rely on this flag.
|
1
tests/pass/uninit_number_ignored.stderr
Normal file
1
tests/pass/uninit_number_ignored.stderr
Normal file
@ -0,0 +1 @@
|
||||
WARNING: `-Zmiri-allow-uninit-numbers` is deprecated and planned to be removed. Please let us know at <https://github.com/rust-lang/miri/issues/2187> if you rely on this flag.
|
Loading…
Reference in New Issue
Block a user