diff --git a/crates/libafl/src/executors/hooks/inprocess.rs b/crates/libafl/src/executors/hooks/inprocess.rs index 7a952bbb95..586e3ab49e 100644 --- a/crates/libafl/src/executors/hooks/inprocess.rs +++ b/crates/libafl/src/executors/hooks/inprocess.rs @@ -496,7 +496,9 @@ impl InProcessExecutorHandlerData { log::error!("Target crashed!"); - if let Some(bsod_info) = bsod_info { + if std::env::var("LIBAFL_MINIBSOD").is_ok() + && let Some(bsod_info) = bsod_info + { let bsod = generate_minibsod_to_vec( bsod_info.signal, &bsod_info.siginfo, diff --git a/crates/libafl/src/executors/hooks/unix.rs b/crates/libafl/src/executors/hooks/unix.rs index 2ffcc3f13d..1724be0728 100644 --- a/crates/libafl/src/executors/hooks/unix.rs +++ b/crates/libafl/src/executors/hooks/unix.rs @@ -237,7 +237,7 @@ pub mod unix_signal_handler { log::error!("Child crashed!"); - { + if std::env::var("LIBAFL_MINIBSOD").is_ok() { let mut bsod = Vec::new(); { let mut writer = std::io::BufWriter::new(&mut bsod); @@ -278,7 +278,7 @@ pub mod unix_signal_handler { "We crashed at addr 0x{si_addr:x}, but are not in the target... Bug in the fuzzer? Exiting." ); - { + if std::env::var("LIBAFL_MINIBSOD").is_ok() { let mut bsod = Vec::new(); { let mut writer = std::io::BufWriter::new(&mut bsod);