From b667634482e7233649aaf07b4d8eef4244103b58 Mon Sep 17 00:00:00 2001 From: Dominik Maier Date: Wed, 28 Oct 2020 19:13:41 +0100 Subject: [PATCH] setup_crash_handlers for unix only (so far) --- src/executors/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/executors/mod.rs b/src/executors/mod.rs index 6e35650d88..abfea74ff0 100644 --- a/src/executors/mod.rs +++ b/src/executors/mod.rs @@ -113,7 +113,13 @@ pub mod unix_signals { } } +#[cfg(unix)] +use unix_signals as os_signals; +#[cfg(not(unix))] +compile_error!("InMemoryExecutor not yet supported on this OS"); + impl Executor for InMemoryExecutor { + fn run_target(&mut self) -> Result { let bytes = match self.base.cur_input.as_ref() { Some(i) => i.serialize(), @@ -121,6 +127,7 @@ impl Executor for InMemoryExecutor { }; unsafe { CURRENT_INMEMORY_EXECUTOR_PTR = self as *const InMemoryExecutor; + os_signals::setup_crash_handlers(); } let ret = match bytes { Ok(b) => Ok((self.harness)(self, b)),