diff --git a/fuzzers/binary_only/intel_pt_baby_fuzzer/Makefile.toml b/fuzzers/binary_only/intel_pt_baby_fuzzer/Makefile.toml new file mode 100644 index 0000000000..f3aba8ebe4 --- /dev/null +++ b/fuzzers/binary_only/intel_pt_baby_fuzzer/Makefile.toml @@ -0,0 +1,26 @@ +[env] +RUST_BACKTRACE = "0" +TARGET_DIR = "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}" + +[env.development] +PROFILE_DIR = "debug" +CARGO_BUILD_ARG = "" + +[env.release] +PROFILE_DIR = "release" +CARGO_BUILD_ARG = "--release" + +[tasks.build] +command = "cargo" +args = ["build", "--profile", "${CARGO_MAKE_CARGO_PROFILE}"] + +[tasks.setcap] +script = "sudo setcap cap_ipc_lock,cap_sys_ptrace,cap_sys_admin,cap_syslog=ep ${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/${PROFILE_DIR}/${CARGO_MAKE_CRATE_NAME}" +dependencies = ["build"] + +[tasks.run] +command = "${CARGO_MAKE_CRATE_TARGET_DIRECTORY}/${PROFILE_DIR}/${CARGO_MAKE_CRATE_NAME}" +dependencies = ["build", "setcap"] + +[tasks.default] +alias = "run" diff --git a/fuzzers/binary_only/intel_pt_baby_fuzzer/README.md b/fuzzers/binary_only/intel_pt_baby_fuzzer/README.md index 79fc1ced19..2ca0054b3a 100644 --- a/fuzzers/binary_only/intel_pt_baby_fuzzer/README.md +++ b/fuzzers/binary_only/intel_pt_baby_fuzzer/README.md @@ -12,4 +12,6 @@ After building this example with `cargo build`, you need to give to the executab You can run this example using `cargo run`, and you can enable the TUI feature by building and running with `--features tui`. +As an alternative, simply run `cargo make` to build and run the fuzzer (requires `cargo-make`). + This fuzzer is compatible with Linux hosts only having an Intel PT compatible CPU. diff --git a/libafl/src/stages/mutational.rs b/libafl/src/stages/mutational.rs index 5e67897a85..b5347eccd2 100644 --- a/libafl/src/stages/mutational.rs +++ b/libafl/src/stages/mutational.rs @@ -226,9 +226,6 @@ where } /// Creates a new transforming mutational stage with the given max iterations - /// - /// # Errors - /// Will return [`Error::IllegalArgument`] for `max_iterations` of 0. #[inline] pub fn transforming_with_max_iterations(mutator: M, max_iterations: NonZeroUsize) -> Self { let stage_id = unsafe {