diff --git a/README.md b/README.md index 6ec4830..a725682 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,10 @@ http://github.com/langston-barrett/tree-splicer code mutator which icemaker can Trophy case (1120+): +https://github.com/rust-lang/rust/issues/123863 +https://github.com/rust-lang/rust/issues/123862 +https://github.com/rust-lang/rust/issues/123861 +https://github.com/rust-lang/rust/issues/123821 https://github.com/rust-lang/rust/issues/123818 https://github.com/rust-lang/rust/issues/123810 https://github.com/rust-lang/rust/issues/123809 diff --git a/src/fuzz_tree_splicer.rs b/src/fuzz_tree_splicer.rs index 4dc7a84..9a14365 100644 --- a/src/fuzz_tree_splicer.rs +++ b/src/fuzz_tree_splicer.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; use std::path::{Path, PathBuf}; -use std::time::{Instant}; +use std::time::Instant; use rand::Rng; use tree_sitter::{Parser, Tree}; diff --git a/src/ice.rs b/src/ice.rs index 34ce7a9..6d4b4e6 100644 --- a/src/ice.rs +++ b/src/ice.rs @@ -64,6 +64,7 @@ impl Default for ICEKind { #[derive(Debug, Default, Serialize, Deserialize, Clone, Copy, Eq, PartialEq)] pub enum Interestingness { + VeryInteresting, #[default] Interesting, Boring, @@ -103,6 +104,7 @@ impl ICE { // print a ICE to stdout or something pub(crate) fn to_printable(&self) -> ICEDisplay { let kind = match self.kind { + ICEKind::Ice(Interestingness::VeryInteresting) => "ICE!".red(), ICEKind::Ice(Interestingness::Interesting) => "ICE".red(), ICEKind::Ice(Interestingness::Boring) => "ice".normal(), ICEKind::Ub(UbKind::Interesting) => "UB".green(), diff --git a/src/main.rs b/src/main.rs index b4a6738..7e01157 100644 --- a/src/main.rs +++ b/src/main.rs @@ -943,6 +943,8 @@ impl ICE { silent: bool, global_tempdir_path: &PathBuf, ) -> Option { + // potentially very intersting? + // convert IntoIterator to &[&str] let compiler_flags = &compiler_flags.into_iter().cloned().collect::>()[..]; @@ -1070,12 +1072,39 @@ impl ICE { let stderr = String::from_utf8_lossy(&cmd_output.stderr); let mut lines_iter = stderr.lines(); + //potentially_very_interesting + let mut pviopt = None; + let mut ice_msg = lines_iter .find(|line| { line.contains("panicked at") || line.contains("error: internal compiler error: ") }) .unwrap_or_default() .to_string(); + + if stderr + .lines() + .nth(0) + .map(|line| line.contains(&ice_msg)) + .is_some() + { + pviopt = Some(Interestingness::VeryInteresting); + } + + // iff potentially_very_interesting is Some, map Interesting to VeryInterestinge else return whatever else we had + fn pvi( + prev_intr: ICEKind, + potentially_very_interesting: Option, + ) -> ICEKind { + if matches!(prev_intr, ICEKind::Ice(Interestingness::Interesting)) + && potentially_very_interesting.is_some() + { + ICEKind::Ice(Interestingness::VeryInteresting) + } else { + prev_intr + } + } + if ice_msg.contains("panicked at") { // the panick message is actually on the next line let panic_msg = lines_iter @@ -1084,6 +1113,7 @@ impl ICE { // reconstruct the old one-line panic msg, somewhat ice_msg = format!(r#"{ice_msg} '{panic_msg}'"#); } + drop(lines_iter); ice_msg = ice_msg.replace("error: internal compiler error:", "ICE:"); @@ -1121,6 +1151,7 @@ impl ICE { // this is basically an unprocessed ICE, we know we have crashed, but we have not reduced the flags yet. // prefer return this over returning an possible hang while minimizing flags later let raw_ice = if let Some((ice_msg, icekind, query_stack)) = found_error.clone() { + let icekind = pvi(icekind, pviopt); let ice = ICE { regresses_on: Regression::Master, needs_feature: uses_feature,