From dbbd54169d014537707e871a2392063e07554f99 Mon Sep 17 00:00:00 2001 From: Max Ammann Date: Thu, 11 Jul 2024 12:26:30 +0100 Subject: [PATCH] Add documentation for InProcessForkExecutor for fuzzing rust (#2378) --- libafl/src/executors/inprocess_fork/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libafl/src/executors/inprocess_fork/mod.rs b/libafl/src/executors/inprocess_fork/mod.rs index e59e6744e4..768e9a0570 100644 --- a/libafl/src/executors/inprocess_fork/mod.rs +++ b/libafl/src/executors/inprocess_fork/mod.rs @@ -40,7 +40,8 @@ pub mod inner; /// A version of `InProcessForkExecutor` with a state accessible from the harness. pub mod stateful; -/// The `InProcessForkExecutor` with no user hooks +/// The `InProcessForkExecutor` with no user hooks. On Linux, when fuzzing a Rust target, set `panic = "abort"` in your `Cargo.toml` (see [Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#panic)). +/// Else panics can not be caught by LibAFL. pub type InProcessForkExecutor<'a, H, OT, S, SP, EM, Z> = GenericInProcessForkExecutor<'a, H, (), OT, S, SP, EM, Z>; @@ -79,7 +80,8 @@ where } } -/// [`GenericInProcessForkExecutor`] is an executor that forks the current process before each execution. +/// [`GenericInProcessForkExecutor`] is an executor that forks the current process before each execution. On Linux, when fuzzing a Rust target, set `panic = "abort"` in your `Cargo.toml` (see [Cargo documentation](https://doc.rust-lang.org/cargo/reference/profiles.html#panic)). +/// Else panics can not be caught by LibAFL. pub struct GenericInProcessForkExecutor<'a, H, HT, OT, S, SP, EM, Z> where H: FnMut(&S::Input) -> ExitKind + ?Sized,