Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Commit

Permalink
2023-03-14 (#1201)
Browse files Browse the repository at this point in the history
  • Loading branch information
hermanventer authored Mar 15, 2023
1 parent e45acd4 commit c442647
Show file tree
Hide file tree
Showing 18 changed files with 51 additions and 63 deletions.
68 changes: 34 additions & 34 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified binaries/summary_store.tar
Binary file not shown.
2 changes: 1 addition & 1 deletion checker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]

name = "mirai"
version = "1.1.5"
version = "1.1.6"
authors = ["Herman Venter <herman_venter@msn.com>"]
description = "A static analysis tool for Rust, based on Abstract Interpretation of MIR"
repository = "https://github.com/facebookexperimental/MIRAI"
Expand Down
2 changes: 1 addition & 1 deletion checker/src/block_visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com
self.visit_non_diverging_intrinsic(non_diverging_intrinsic);
}
mir::StatementKind::Nop => (),
mir::StatementKind::PlaceMention(_) => (),
}
}

Expand Down Expand Up @@ -293,7 +294,6 @@ impl<'block, 'analysis, 'compilation, 'tcx> BlockVisitor<'block, 'analysis, 'com
target,
unwind,
} => self.visit_drop(place, *target, *unwind),
mir::TerminatorKind::DropAndReplace { .. } => assume_unreachable!(),
mir::TerminatorKind::Call {
func,
args,
Expand Down
1 change: 0 additions & 1 deletion checker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#![feature(rustc_private)]
#![feature(array_chunks)]
#![feature(box_patterns)]
#![feature(box_syntax)]
#![feature(core_intrinsics)]
#![allow(clippy::mutable_key_type)]

Expand Down
1 change: 0 additions & 1 deletion checker/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// private and not very stable set of APIs from whatever compiler is in the path when we run Mirai.
// While pretty bad, it is a lot less bad than having to write our own compiler, so here goes.
#![feature(rustc_private)]
#![feature(box_syntax)]

extern crate env_logger;
extern crate mirai;
Expand Down
2 changes: 1 addition & 1 deletion checker/src/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ fn make_options_parser<'help>(running_test_harness: bool) -> Command<'help> {
// to construct this more then once per regular program run.
let mut parser = Command::new("MIRAI")
.no_binary_name(true)
.version("v1.1.0")
.version("v1.1.6")
.arg(Arg::new("single_func")
.long("single_func")
.takes_value(true)
Expand Down
4 changes: 2 additions & 2 deletions checker/tests/call_graph/fnptr_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ commit;
/* EXPECTED:CALL_SITES{
"files": [
"tests/call_graph/fnptr_fold.rs",
"/rustc/e3dfeeaa45f117281b19773d67f3f253de65cee1/library/std/src/io/stdio.rs",
"/rustc/e3dfeeaa45f117281b19773d67f3f253de65cee1/library/core/src/fmt/mod.rs"
"/rustc/22f247c6f3ed388cb702d01c2ff27da658a8b353/library/std/src/io/stdio.rs",
"/rustc/22f247c6f3ed388cb702d01c2ff27da658a8b353/library/core/src/fmt/mod.rs"
],
"callables": [
{
Expand Down
4 changes: 2 additions & 2 deletions checker/tests/call_graph/static_fold.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ commit;
/* EXPECTED:CALL_SITES{
"files": [
"tests/call_graph/static_fold.rs",
"/rustc/e3dfeeaa45f117281b19773d67f3f253de65cee1/library/std/src/io/stdio.rs",
"/rustc/e3dfeeaa45f117281b19773d67f3f253de65cee1/library/core/src/fmt/mod.rs"
"/rustc/22f247c6f3ed388cb702d01c2ff27da658a8b353/library/std/src/io/stdio.rs",
"/rustc/22f247c6f3ed388cb702d01c2ff27da658a8b353/library/core/src/fmt/mod.rs"
],
"callables": [
{
Expand Down
1 change: 0 additions & 1 deletion checker/tests/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// private and not very stable set of APIs from whatever compiler is in the path when we run Mirai.
// While pretty bad, it is a lot less bad than having to write our own compiler, so here goes.
#![feature(rustc_private)]
#![feature(box_syntax)]

extern crate mirai;
extern crate rayon;
Expand Down
4 changes: 2 additions & 2 deletions checker/tests/run-pass/binary_overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ pub fn tu128_overflowing_mul() {
pub fn ti8_div_m1() -> i8 {
let a: i8 = -128;
let b: i8 = -1;
a / b //~ attempt to divide with overflow
a / b // ~ attempt to divide with overflow
}

pub fn ti8_rem_m1() -> i8 {
let a: i8 = -128;
let b: i8 = -1;
a % b //~ attempt to calculate the remainder with overflow
a % b // ~ attempt to calculate the remainder with overflow
}

pub fn main() {}
4 changes: 1 addition & 3 deletions checker/tests/run-pass/box_fail.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@

// A test that creates a box with a failure path that calls box_free

#![feature(box_syntax)]

pub fn test13(i: i64) {
let _x = box -i; //~ possible attempt to negate with overflow
let _x = Box::new(-i); //~ possible attempt to negate with overflow
}

pub fn main() {}
4 changes: 1 addition & 3 deletions checker/tests/run-pass/box_struct.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// A test that uses paths containing base addresses.

#![feature(box_syntax)]

use mirai_annotations::*;

pub struct Foo {
Expand All @@ -21,7 +19,7 @@ pub fn f() -> Box<Foo> {
};
verify!(foo.x == 1);
verify!(foo.y == 1111111111111111111);
box foo
Box::new(foo)
}

pub fn main() {}
4 changes: 1 addition & 3 deletions checker/tests/run-pass/path_refinement.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

// A test that use enum discriminants

#![feature(box_syntax)]

use mirai_annotations::*;

pub enum Path {
Expand All @@ -29,7 +27,7 @@ impl Path {
checked_assume!(qualifier.path_length() <= 10);
Path::QualifiedPath {
length: qualifier.path_length() + 1,
qualifier: box Path::Root,
qualifier: Box::new(Path::Root),
}
}
_ => new_root,
Expand Down
1 change: 0 additions & 1 deletion checker/tests/run-pass/size_of_val.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ use mirai_annotations::*;

pub fn test1() {
verify!(mem::size_of_val(&5i32) == 4);
verify!(mem::size_of_val(Box::new(5i32).as_ref()) == 4);

let x: [u8; 13] = [0; 13];
let y: &[u8] = &x;
Expand Down
5 changes: 2 additions & 3 deletions checker/tests/run-pass/weak_update_heap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
//

// A test that assigns to a location that is unknown at compile time.
#![feature(box_syntax)]

// use mirai_annotations::*;

Expand All @@ -18,8 +17,8 @@ struct Foo {
}

fn do_join(cond: bool) {
let mut a = box Foo { f: 1 };
let mut b = box Foo { f: 2 };
let mut a = Box::new(Foo { f: 1 });
let mut b = Box::new(Foo { f: 2 });
{
let c = if cond { &mut a } else { &mut b };
c.f = 3;
Expand Down
5 changes: 2 additions & 3 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
[toolchain]
channel = "nightly-2023-03-08"
components = [ "clippy", "rustfmt", "rustc-dev", "rust-std", "llvm-tools-preview" ]
profile = "minimal"
channel = "nightly-2023-03-14"
components = [ "clippy", "rustfmt", "rustc-dev", "rust-src", "rust-std", "llvm-tools-preview" ]
2 changes: 1 addition & 1 deletion validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ time cargo test
cargo uninstall mirai || true
cargo install --path ./checker

# Run mirai on itself (using the optimized build in cargo as the bootstrap).
# Run mirai on itself, using the optimized build in cargo as the bootstrap.
cargo clean
cargo mirai

0 comments on commit c442647

Please sign in to comment.