Skip to content

Commit 1eae8f0

Browse files
committed
WIP more detailed regression (master/beta/nightly/stable..) info for reports
1 parent dd460cf commit 1eae8f0

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/ice.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ use std::{io::Write, path::PathBuf};
22

33
use clap::Parser;
44
use colored::Colorize;
5+
use lazy_static::lazy_static;
56
use once_cell::sync::Lazy;
67
use serde::{Deserialize, Serialize};
78
use tempdir::TempDir;
@@ -414,6 +415,20 @@ pub enum Regression {
414415
Master,
415416
}
416417

418+
// ice is reproducible on:
419+
pub struct RegressionDetailed {
420+
Stable: bool,
421+
Beta: bool,
422+
Nightly: bool,
423+
Master: bool,
424+
LocalDebugAssertions: bool,
425+
}
426+
427+
lazy_static! {
428+
pub(crate) static ref RUSTUP_HOME: PathBuf =
429+
home::rustup_home().expect("could not find rustup home");
430+
}
431+
417432
impl std::fmt::Display for Regression {
418433
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::result::Result<(), std::fmt::Error> {
419434
let s = match self {

src/main.rs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,6 +1650,18 @@ fn find_out_crashing_channel(
16501650
}
16511651
}
16521652

1653+
fn get_crashing_channels(
1654+
bad_flags: &Vec<&&str>,
1655+
file: &Path,
1656+
global_tempdir_path: &PathBuf,
1657+
) -> RegressionDetailed {
1658+
let rustup_home = &ice::RUSTUP_HOME;
1659+
1660+
// WIP copy other stuff into here, see function above
1661+
1662+
todo!();
1663+
}
1664+
16531665
/// take the executable we used and the executables/runs output and determine whether the should raise an ICE or not (by looking at the exit status / stderr for example)
16541666
#[allow(non_snake_case)]
16551667
fn find_ICE_string(
@@ -1785,6 +1797,15 @@ fn find_ICE_string(
17851797

17861798
let delay_span_bug_regex = Regex::new("^error: internal compiler error: no errors encountered even though `delay_span_bug` issued$").unwrap();
17871799

1800+
/*
1801+
for text in [&output.stdout, &output.stderr] {
1802+
let text = String::from_utf8(text.clone()).unwrap_or_default();
1803+
if text.contains("deadlock detected") {
1804+
eprintln!("\nDEADLOCK\n\n{text}\n\n\n\n");
1805+
}
1806+
}
1807+
*/
1808+
17881809
[&output.stdout, &output.stderr]
17891810
.into_iter()
17901811
.find_map(|executable_output| {

0 commit comments

Comments
 (0)