Skip to content

Commit a5c2211

Browse files
committed
Auto merge of #1620 - RalfJung:overflow, r=RalfJung
enable overflow checks in the standard library
2 parents 30e0c30 + 330ec0a commit a5c2211

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cargo-miri/bin.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,8 @@ path = "lib.rs"
354354
command.env_remove("RUSTC_WRAPPER");
355355
command.env_remove("RUSTFLAGS");
356356
// Disable debug assertions in the standard library -- Miri is already slow enough.
357-
command.env("RUSTFLAGS", "-Cdebug-assertions=off");
357+
// But keep the overflow checks, they are cheap.
358+
command.env("RUSTFLAGS", "-Cdebug-assertions=off -Coverflow-checks=on");
358359
// Finally run it!
359360
if command.status().expect("failed to run xargo").success().not() {
360361
show_error(format!("failed to run xargo"));

0 commit comments

Comments
 (0)