parent
886519b10c
commit
39c32d55e7
@ -146,11 +146,9 @@ pub fn main() {
|
|||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
// The Monitor trait define how the fuzzer stats are reported to the user
|
// The Monitor trait define how the fuzzer stats are reported to the user
|
||||||
let monitor = SimpleMonitor::with_user_monitor(
|
let monitor = SimpleMonitor::with_user_monitor(|s| {
|
||||||
|s| {
|
|
||||||
println!("{s}");
|
println!("{s}");
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
// The event manager handle the various events generated during the fuzzing loop
|
// The event manager handle the various events generated during the fuzzing loop
|
||||||
// such as the notification of the addition of a new item to the corpus
|
// such as the notification of the addition of a new item to the corpus
|
||||||
|
@ -198,15 +198,13 @@ fn fuzz(
|
|||||||
let file_null = File::open("/dev/null")?;
|
let file_null = File::open("/dev/null")?;
|
||||||
|
|
||||||
// 'While the stats are state, they are usually used in the broker - which is likely never restarted
|
// 'While the stats are state, they are usually used in the broker - which is likely never restarted
|
||||||
let monitor = SimpleMonitor::with_user_monitor(
|
let monitor = SimpleMonitor::with_user_monitor(|s| {
|
||||||
|s| {
|
|
||||||
#[cfg(unix)]
|
#[cfg(unix)]
|
||||||
writeln!(&mut stdout_cpy, "{s}").unwrap();
|
writeln!(&mut stdout_cpy, "{s}").unwrap();
|
||||||
#[cfg(windows)]
|
#[cfg(windows)]
|
||||||
println!("{s}");
|
println!("{s}");
|
||||||
writeln!(log.borrow_mut(), "{:?} {s}", current_time()).unwrap();
|
writeln!(log.borrow_mut(), "{:?} {s}", current_time()).unwrap();
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|
||||||
let mut shmem_provider = StdShMemProvider::new()?;
|
let mut shmem_provider = StdShMemProvider::new()?;
|
||||||
|
|
||||||
|
@ -142,11 +142,9 @@ pub fn fuzz() -> Result<(), Error> {
|
|||||||
|
|
||||||
let mut shmem_provider = StdShMemProvider::new().expect("Failed to init shared memory");
|
let mut shmem_provider = StdShMemProvider::new().expect("Failed to init shared memory");
|
||||||
|
|
||||||
let monitor = SimpleMonitor::with_user_monitor(
|
let monitor = SimpleMonitor::with_user_monitor(|s| {
|
||||||
|s| {
|
|
||||||
println!("{s}");
|
println!("{s}");
|
||||||
}
|
});
|
||||||
);
|
|
||||||
let (state, mut mgr) = match SimpleRestartingEventManager::launch(monitor, &mut shmem_provider)
|
let (state, mut mgr) = match SimpleRestartingEventManager::launch(monitor, &mut shmem_provider)
|
||||||
{
|
{
|
||||||
Ok(res) => res,
|
Ok(res) => res,
|
||||||
|
@ -11,7 +11,8 @@ use libafl::executors::{hooks::ExecutorHook, HasObservers};
|
|||||||
#[cfg(any(
|
#[cfg(any(
|
||||||
feature = "pointer_maps",
|
feature = "pointer_maps",
|
||||||
feature = "sancov_pcguard_edges",
|
feature = "sancov_pcguard_edges",
|
||||||
feature = "sancov_pcguard_hitcounts"
|
feature = "sancov_pcguard_hitcounts",
|
||||||
|
feature = "sancov_ctx",
|
||||||
))]
|
))]
|
||||||
use crate::coverage::EDGES_MAP;
|
use crate::coverage::EDGES_MAP;
|
||||||
use crate::coverage::MAX_EDGES_NUM;
|
use crate::coverage::MAX_EDGES_NUM;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user