diff --git a/docs/telemetry.md b/docs/telemetry.md index 7cfde5938b..f4d87dc72a 100644 --- a/docs/telemetry.md +++ b/docs/telemetry.md @@ -241,10 +241,6 @@ The following information is recorded for Salvo related tasks: during symbolic execution but may have been input tainted. Examples include `Cmovs` and `Movq`. For the full list, see [iced_x86::mnemonic](https://docs.rs/iced-x86/1.10.3/iced_x86/enum.Mnemonic.html). -* Z3ErrorCode - An error code that corresponds to an error code from Z3 when - solving a constraint fails. Examples include `NoParser` and - `InvalidPattern`. For the full list, see - [z3_sys::ErrorCode](https://docs.rs/z3-sys/0.6.3/z3_sys/enum.ErrorCode.html) * SymexTimeout - A u64 representing the maximum time in seconds to spend during symbolic execution, reported each time symbolic execution was stopped due to the limit. diff --git a/src/agent/Cargo.lock b/src/agent/Cargo.lock index dd8e46838a..8f6a932c87 100644 --- a/src/agent/Cargo.lock +++ b/src/agent/Cargo.lock @@ -2184,7 +2184,6 @@ dependencies = [ "serde", "tokio", "uuid 0.8.2", - "z3-sys", ] [[package]] @@ -4147,12 +4146,6 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" -[[package]] -name = "z3-sys" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa18ba5fbd4933e41ffb440c3fd91f91fe9cdb7310cce3ddfb6648563811de0" - [[package]] name = "zip" version = "0.6.3" diff --git a/src/agent/onefuzz-telemetry/Cargo.toml b/src/agent/onefuzz-telemetry/Cargo.toml index e6668c1be2..2b707a6f18 100644 --- a/src/agent/onefuzz-telemetry/Cargo.toml +++ b/src/agent/onefuzz-telemetry/Cargo.toml @@ -7,7 +7,6 @@ license = "MIT" [features] default = [] -z3 = ["z3-sys"] intel_instructions = ["iced-x86"] [dependencies] @@ -16,7 +15,6 @@ appinsights = { version = "0.2.3" } log = "0.4" uuid = { version = "0.8", features = ["serde", "v4"] } serde = { version = "1.0", features = ["derive"] } -z3-sys = { version = "0.6", optional = true} iced-x86 = { version = "1.17", optional = true} tokio = { version = "1.24", features = ["full"] } lazy_static = "1.4" diff --git a/src/agent/onefuzz-telemetry/src/lib.rs b/src/agent/onefuzz-telemetry/src/lib.rs index 3efee1fa06..4720caac54 100644 --- a/src/agent/onefuzz-telemetry/src/lib.rs +++ b/src/agent/onefuzz-telemetry/src/lib.rs @@ -8,8 +8,6 @@ use serde::{Deserialize, Serialize}; use std::fmt; use std::sync::{LockResult, RwLockReadGuard, RwLockWriteGuard}; use uuid::Uuid; -#[cfg(feature = "z3")] -use z3_sys::ErrorCode as Z3ErrorCode; pub use chrono::Utc; @@ -42,25 +40,6 @@ impl InstanceTelemetryKey { } } -#[cfg(feature = "z3")] -pub fn z3_error_as_str(code: &Z3ErrorCode) -> &'static str { - match code { - Z3ErrorCode::OK => "OK", - Z3ErrorCode::SortError => "SortError", - Z3ErrorCode::IOB => "IOB", - Z3ErrorCode::InvalidArg => "InvalidArg", - Z3ErrorCode::ParserError => "ParserError", - Z3ErrorCode::NoParser => "NoParser", - Z3ErrorCode::InvalidPattern => "InvalidPattern", - Z3ErrorCode::MemoutFail => "MemoutFail", - Z3ErrorCode::FileAccessError => "FileAccessError", - Z3ErrorCode::InternalFatal => "InternalFatal", - Z3ErrorCode::InvalidUsage => "InvalidUsage", - Z3ErrorCode::DecRefError => "DecRefError", - Z3ErrorCode::Exception => "Exception", - } -} - impl fmt::Display for InstanceTelemetryKey { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { write!(f, "{}", self.0) @@ -182,10 +161,6 @@ pub enum EventData { MissedInstructionCode(IntelInstructionCode), #[cfg(feature = "intel_instructions")] MissedInstructionMnemonic(IntelInstructionMnemonic), - #[cfg(feature = "z3")] - Z3ErrorCode(Z3ErrorCode), - #[cfg(feature = "z3")] - Z3ErrorString(String), SymexTimeout(u64), } @@ -260,10 +235,6 @@ impl EventData { ("divergence_path_expected_index", x.to_string()) } Self::DivergencePathActualIndex(x) => ("divergence_path_actual_index", x.to_string()), - #[cfg(feature = "z3")] - Self::Z3ErrorCode(x) => ("z3_error_code", z3_error_as_str(x).to_owned()), - #[cfg(feature = "z3")] - Self::Z3ErrorString(x) => ("z3_error_string", x.to_owned()), Self::SymexTimeout(x) => ("symex_timeout", x.to_string()), } } @@ -328,10 +299,6 @@ impl EventData { Self::MissedInstructionCode(_) => true, #[cfg(feature = "intel_instructions")] Self::MissedInstructionMnemonic(_) => true, - #[cfg(feature = "z3")] - Self::Z3ErrorCode(_) => true, - #[cfg(feature = "z3")] - Self::Z3ErrorString(_) => false, Self::SymexTimeout(_) => true, } }