mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-19 04:58:09 +00:00
make asan_log optional in CrashReport (#714)
This commit is contained in:
@ -208,7 +208,7 @@ impl CrashReport {
|
|||||||
minimized_stack_function_names: crash_log.minimized_stack_function_names,
|
minimized_stack_function_names: crash_log.minimized_stack_function_names,
|
||||||
minimized_stack_function_names_sha256,
|
minimized_stack_function_names_sha256,
|
||||||
call_stack: crash_log.call_stack,
|
call_stack: crash_log.call_stack,
|
||||||
asan_log: Some(crash_log.text),
|
asan_log: crash_log.text,
|
||||||
scariness_score: crash_log.scariness_score,
|
scariness_score: crash_log.scariness_score,
|
||||||
scariness_description: crash_log.scariness_description,
|
scariness_description: crash_log.scariness_description,
|
||||||
task_id,
|
task_id,
|
||||||
|
@ -169,12 +169,11 @@ impl<'a> Tester<'a> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
let fault_type = exception.description.to_string();
|
let fault_type = exception.description.to_string();
|
||||||
let text = "".to_string();
|
|
||||||
let sanitizer = fault_type.to_string();
|
let sanitizer = fault_type.to_string();
|
||||||
let summary = crash_site;
|
let summary = crash_site;
|
||||||
|
|
||||||
Some(CrashLog::new(
|
Some(CrashLog::new(
|
||||||
text, summary, sanitizer, fault_type, None, None, call_stack,
|
None, summary, sanitizer, fault_type, None, None, call_stack,
|
||||||
)?)
|
)?)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
@ -254,13 +253,12 @@ impl<'a> Tester<'a> {
|
|||||||
CRASH_SITE_UNAVAILABLE.to_owned()
|
CRASH_SITE_UNAVAILABLE.to_owned()
|
||||||
};
|
};
|
||||||
|
|
||||||
let text = "".to_string();
|
|
||||||
let summary = crash_site;
|
let summary = crash_site;
|
||||||
let sanitizer = crash_type.clone();
|
let sanitizer = crash_type.clone();
|
||||||
let fault_type = crash_type;
|
let fault_type = crash_type;
|
||||||
|
|
||||||
Some(CrashLog::new(
|
Some(CrashLog::new(
|
||||||
text, summary, sanitizer, fault_type, None, None, call_stack,
|
None, summary, sanitizer, fault_type, None, None, call_stack,
|
||||||
)?)
|
)?)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
|
@ -40,7 +40,7 @@ pub struct StackEntry {
|
|||||||
|
|
||||||
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
#[derive(Clone, Debug, Default, PartialEq, Serialize, Deserialize)]
|
||||||
pub struct CrashLog {
|
pub struct CrashLog {
|
||||||
pub text: String,
|
pub text: Option<String>,
|
||||||
pub sanitizer: String,
|
pub sanitizer: String,
|
||||||
pub summary: String,
|
pub summary: String,
|
||||||
pub fault_type: String,
|
pub fault_type: String,
|
||||||
@ -121,7 +121,7 @@ fn filter_funcs(entry: &StackEntry, stack_filter: &RegexSet) -> Option<StackEntr
|
|||||||
|
|
||||||
impl CrashLog {
|
impl CrashLog {
|
||||||
pub fn new(
|
pub fn new(
|
||||||
text: String,
|
text: Option<String>,
|
||||||
summary: String,
|
summary: String,
|
||||||
sanitizer: String,
|
sanitizer: String,
|
||||||
fault_type: String,
|
fault_type: String,
|
||||||
@ -184,7 +184,7 @@ impl CrashLog {
|
|||||||
let stack = parse_call_stack(&text).unwrap_or_default();
|
let stack = parse_call_stack(&text).unwrap_or_default();
|
||||||
let (scariness_score, scariness_description) = parse_scariness(&text);
|
let (scariness_score, scariness_description) = parse_scariness(&text);
|
||||||
Self::new(
|
Self::new(
|
||||||
text,
|
Some(text),
|
||||||
summary,
|
summary,
|
||||||
sanitizer,
|
sanitizer,
|
||||||
fault_type,
|
fault_type,
|
||||||
|
Reference in New Issue
Block a user