From fc23782dc396b7700ef8a70515e4570e0a3fcf16 Mon Sep 17 00:00:00 2001 From: "Dongjia \"toka\" Zhang" Date: Tue, 18 Apr 2023 12:15:47 +0200 Subject: [PATCH] Fix `is_valid` on Windows (#1217) * git add -u * fix cfg * pub --------- Co-authored-by: Andrea Fioraldi --- libafl/src/executors/inprocess.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libafl/src/executors/inprocess.rs b/libafl/src/executors/inprocess.rs index b069305a65..ef76033d12 100644 --- a/libafl/src/executors/inprocess.rs +++ b/libafl/src/executors/inprocess.rs @@ -474,13 +474,8 @@ impl InProcessExecutorHandlerData { r } - #[cfg(all(windows, feature = "std"))] - pub(crate) fn is_valid(&self) -> bool { - self.in_target == 1 - } - - #[cfg(unix)] - pub(crate) fn is_valid(&self) -> bool { + #[cfg(any(unix, feature = "std"))] + pub fn is_valid(&self) -> bool { !self.current_input_ptr.is_null() }