diff --git a/Cargo.lock b/Cargo.lock index 9598bec2..b520f93c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -99,7 +99,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -140,9 +140,9 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.18.1" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +checksum = "afc309ed89476c8957c50fb818f56fe894db857866c3e163335faa91dc34eb85" dependencies = [ "camino", "cargo-platform", @@ -154,9 +154,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.0" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aeb932158bd710538c73702db6945cb68a8fb08c519e6e12706b94263b36db8" +checksum = "fd9de9f2205d5ef3fd67e685b0df337994ddd4495e2a28d185500d0e1edfea47" dependencies = [ "shlex", ] @@ -216,9 +216,9 @@ checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7" [[package]] name = "cmake" -version = "0.1.51" +version = "0.1.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb1e43aa7fd152b1f968787f7dbcdeb306d1867ff373c69955211876c053f91a" +checksum = "c682c223677e0e5b6b7f63a64b9351844c3f1b1678a68b7ee617e30fb082620e" dependencies = [ "cc", ] @@ -422,9 +422,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "hashbrown" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9bfc1af68b1726ea47d3d5109de126281def866b33970e10fbab11b5dafab3" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] name = "humantime" @@ -474,9 +474,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.11" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" [[package]] name = "lazy_static" @@ -486,9 +486,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.162" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18d287de67fe55fd7e1581fe933d965a5a9477b38e949cfa9f8574ef01506398" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" [[package]] name = "libloading" @@ -667,9 +667,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -804,9 +804,9 @@ checksum = "3316159ab19e19d1065ecc49278e87f767a9dae9fae80348d2b4d4fa4ae02d4d" [[package]] name = "rustix" -version = "0.38.40" +version = "0.38.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e4ea3e1cdc4b559b8e5650f9c8e5998e3e5c1343b4eaf034565f32318d63c0" +checksum = "d7f649912bc1495e167a6edee79151c84b1bad49748cb4f1f1167f459f6224f6" dependencies = [ "bitflags 2.6.0", "errno", @@ -862,14 +862,14 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.133" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" dependencies = [ "itoa", "memchr", @@ -948,9 +948,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.87" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25aa4ce346d03a6dcd68dd8b4010bcb74e54e62c90c573f394c46eae99aba32d" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -1012,7 +1012,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] [[package]] @@ -1038,9 +1038,9 @@ checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" [[package]] name = "untrustworthy_inputs" @@ -1211,7 +1211,7 @@ dependencies = [ [[package]] name = "z3-sys" version = "0.8.1" -source = "git+https://github.com/prove-rs/z3.rs.git#cb10013a2a0a017048b1d218bc734afa390f34ff" +source = "git+https://github.com/prove-rs/z3.rs.git#eb5796f1c6832d2695b6668303f712261b40d29b" dependencies = [ "bindgen", "cmake", @@ -1237,5 +1237,5 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.87", + "syn 2.0.89", ] diff --git a/binaries/summary_store.tar b/binaries/summary_store.tar index 0e205ffc..4db9ec82 100644 Binary files a/binaries/summary_store.tar and b/binaries/summary_store.tar differ diff --git a/checker/src/cargo_mirai.rs b/checker/src/cargo_mirai.rs index 77a80a1b..190592b5 100644 --- a/checker/src/cargo_mirai.rs +++ b/checker/src/cargo_mirai.rs @@ -9,7 +9,7 @@ // 2) It calls mirai rather than rustc for all the targets of the current package. // 3) It runs cargo test --no-run for test targets. -use cargo_metadata::{Package, Target}; +use cargo_metadata::{Package, Target, TargetKind}; use std::ffi::OsString; use std::ops::Index; use std::path::Path; @@ -96,35 +96,38 @@ fn call_cargo_on_each_package_target(package: &Package) { .kind .first() .expect("bad cargo metadata: target::kind"); - if lib_only && kind != "lib" { + if lib_only && !target.is_lib() { continue; } call_cargo_on_target(target, kind); } } -fn call_cargo_on_target(target: &Target, kind: &str) { +fn call_cargo_on_target(target: &Target, kind: &TargetKind) { // Build a cargo command for target let mut cmd = Command::new(std::env::var_os("CARGO").unwrap_or_else(|| OsString::from("cargo"))); - match kind { - "bin" => { + let kind_str = match kind { + TargetKind::Bin => { cmd.arg("check"); cmd.arg("--bin").arg(&target.name); + "bin" } - "lib" => { + TargetKind::Lib => { cmd.arg("check"); cmd.arg("--lib"); + "lib" } - "test" => { + TargetKind::Test => { cmd.arg("test"); cmd.arg("--test").arg(&target.name); cmd.arg("--no-run"); + "test" } _ => { return; } - } + }; let mut args = std::env::args().skip(2); // Add cargo args to cmd until first `--`. @@ -161,7 +164,7 @@ fn call_cargo_on_target(target: &Target, kind: &str) { // Communicate the target kind of the root crate to the calls to cargo-mirai that are invoked via // the RUSTC_WRAPPER setting. - cmd.env("MIRAI_KIND", kind); + cmd.env("MIRAI_KIND", kind_str); // Set the tool chain to be compatible with mirai if let Some(toolchain) = option_env!("RUSTUP_TOOLCHAIN") { diff --git a/checker/src/z3_solver.rs b/checker/src/z3_solver.rs index b40043c6..60d47b8e 100644 --- a/checker/src/z3_solver.rs +++ b/checker/src/z3_solver.rs @@ -2152,3 +2152,11 @@ impl Z3Solver { self.bv_variable(path, num_bits) } } + +impl Drop for Z3Solver { + fn drop(&mut self) { + unsafe { + z3_sys::Z3_del_context(self.z3_context); + }; + } +}