diff --git a/fuzzers/libfuzzer_stb_image/.gitignore b/fuzzers/libfuzzer_stb_image/.gitignore index a977a2ca5b..6545bca68c 100644 --- a/fuzzers/libfuzzer_stb_image/.gitignore +++ b/fuzzers/libfuzzer_stb_image/.gitignore @@ -1 +1,2 @@ -libpng-* \ No newline at end of file +libpng-* +libfuzzer_stb_image diff --git a/fuzzers/libfuzzer_stb_image/libfuzzer_stb_image b/fuzzers/libfuzzer_stb_image/libfuzzer_stb_image deleted file mode 100755 index 128922c19a..0000000000 Binary files a/fuzzers/libfuzzer_stb_image/libfuzzer_stb_image and /dev/null differ diff --git a/libafl/src/executors/command.rs b/libafl/src/executors/command.rs index 41bc3e944d..ff1e67c918 100644 --- a/libafl/src/executors/command.rs +++ b/libafl/src/executors/command.rs @@ -1,15 +1,16 @@ use core::marker::PhantomData; #[cfg(feature = "std")] -use std::{process::Child, time::Duration}; +use std::process::Child; #[cfg(feature = "std")] -use crate::{ - executors::{Executor, ExitKind, HasObservers}, - inputs::Input, - observers::ObserversTuple, - Error, -}; +use crate::{executors::HasObservers, inputs::Input, observers::ObserversTuple, Error}; + +#[cfg(all(feature = "std", unix))] +use crate::executors::{Executor, ExitKind}; + +#[cfg(all(feature = "std", unix))] +use std::time::Duration; /// A `CommandExecutor` is a wrapper around [`std::process::Command`] to execute a target as a child process. /// Construct a `CommandExecutor` by implementing [`CommandConfigurator`] for a type of your choice and calling [`CommandConfigurator::into_executor`] on it. @@ -19,6 +20,12 @@ pub struct CommandExecutor { phantom: PhantomData<(EM, I, S, Z)>, } +impl CommandExecutor { + pub fn inner(&mut self) -> &mut T { + &mut self.inner + } +} + // this only works on unix because of the reliance on checking the process signal for detecting OOM #[cfg(all(feature = "std", unix))] impl Executor for CommandExecutor diff --git a/libafl/src/executors/timeout.rs b/libafl/src/executors/timeout.rs index 9f751bf040..a735a060eb 100644 --- a/libafl/src/executors/timeout.rs +++ b/libafl/src/executors/timeout.rs @@ -211,3 +211,10 @@ where self.executor.observers_mut() } } + +#[cfg(windows)] +impl Drop for TimeoutExecutor { + fn drop(&mut self) { + windows_delete_timer_queue(self.timer_queue); + } +}