From 0ad111415387f1e7480dd64fdf7e872045479868 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Mon, 13 Apr 2020 17:55:39 +0200 Subject: [PATCH] mention new option in README and diagnostics --- README.md | 2 ++ src/diagnostics.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/README.md b/README.md index 4968e666571..3df1bef7cbb 100644 --- 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. diff --git a/src/diagnostics.rs b/src/diagnostics.rs index c387eed5c41..2359b67323d 100644 --- a/src/diagnostics.rs +++ b/src/diagnostics.rs @@ -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![ -- 2.44.0