Skip to content

Commit

Permalink
Merge branch 'main' into fix_brk_maperr
Browse files Browse the repository at this point in the history
  • Loading branch information
domenukk authored Dec 18, 2024
2 parents 18f994e + 57cecca commit 71b40cf
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 6 deletions.
26 changes: 26 additions & 0 deletions fuzzers/binary_only/intel_pt_baby_fuzzer/Makefile.toml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 2 additions & 0 deletions fuzzers/binary_only/intel_pt_baby_fuzzer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 0 additions & 3 deletions libafl/src/stages/mutational.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion libafl_cc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "README.md"
license = "MIT OR Apache-2.0"
keywords = ["fuzzing", "testing", "compiler"]
edition = "2021"
rust-version = "1.78"
rust-version = "1.82"
categories = [
"development-tools::testing",
"emulators",
Expand Down
2 changes: 1 addition & 1 deletion libafl_cc/src/cfg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ where
let new_distance = distance + successor_info.get_weight();
let is_shorter = distances
.get(successor)
.map_or(true, |&current| new_distance < current);
.is_none_or(|&current| new_distance < current);

if is_shorter {
distances.insert(*successor, new_distance);
Expand Down
2 changes: 1 addition & 1 deletion libafl_derive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ readme = "../README.md"
license = "MIT OR Apache-2.0"
keywords = ["fuzzing", "testing"]
edition = "2021"
rust-version = "1.78"
rust-version = "1.82"
categories = [
"development-tools::testing",
"emulators",
Expand Down

0 comments on commit 71b40cf

Please sign in to comment.