]> git.lizzy.rs Git - rust.git/commitdiff
mention new option in README and diagnostics
authorRalf Jung <post@ralfj.de>
Mon, 13 Apr 2020 15:55:39 +0000 (17:55 +0200)
committerRalf Jung <post@ralfj.de>
Mon, 13 Apr 2020 15:58:03 +0000 (17:58 +0200)
README.md
src/diagnostics.rs

index 4968e66657121cd248bd938307f64f97a631b25e..3df1bef7cbbbb65875c082b8dfab8dd387fb8a3e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -176,6 +176,8 @@ Several `-Z` flags are relevant for Miri:
 * `-Zmiri-disable-stacked-borrows` disables checking the experimental
   [Stacked Borrows] aliasing rules.  This can make Miri run faster, but it also
   means no aliasing violations will be detected.
+* `-Zmiri-disable-alignment-check` disables checking pointer alignment on memory
+  accesses.
 * `-Zmiri-disable-isolation` disables host isolation.  As a consequence,
   the program has access to host resources such as environment variables, file
   systems, and randomness.
index c387eed5c41cae20022db68de4aa3473c2780e96..2359b67323d753856d4d831c3f32138932cb0a9a 100644 (file)
@@ -97,6 +97,7 @@ pub fn report_error<'tcx, 'mir>(
                     vec![
                         format!("this usually indicates that your program performed an invalid operation and caused Undefined Behavior"),
                         format!("but alignment errors can also be false positives, see https://github.com/rust-lang/miri/issues/1074"),
+                        format!("you can disable the alignment check with `-Zmiri-disable-alignment-check`, but that could hide true bugs")
                     ],
                 UndefinedBehavior(_) =>
                     vec![