From c095412bc53d46085267a7de83b8683336197bfc Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Sat, 16 Aug 2025 06:33:10 -0400 Subject: [PATCH 1/9] `plugins_available` -> `plugins_installed` --- cargo-afl/src/common.rs | 2 +- cargo-afl/src/config.rs | 2 +- cargo-afl/src/main.rs | 6 +++--- cargo-afl/tests/integration.rs | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cargo-afl/src/common.rs b/cargo-afl/src/common.rs index b161a9722..0d08c3695 100644 --- a/cargo-afl/src/common.rs +++ b/cargo-afl/src/common.rs @@ -57,7 +57,7 @@ pub fn object_file_path() -> Result { afl_llvm_dir().map(|path| path.join(OBJECT_FILE_NAME)) } -pub fn plugins_available() -> Result { +pub fn plugins_installed() -> Result { let afl_llvm_dir = afl_llvm_dir()?; for result in afl_llvm_dir .read_dir() diff --git a/cargo-afl/src/config.rs b/cargo-afl/src/config.rs index 5109e26e6..c1ad2bba1 100644 --- a/cargo-afl/src/config.rs +++ b/cargo-afl/src/config.rs @@ -32,7 +32,7 @@ pub struct Args { pub fn config(args: &Args) -> Result<()> { let object_file_path = common::object_file_path()?; - if !args.force && object_file_path.exists() && args.plugins == common::plugins_available()? { + if !args.force && object_file_path.exists() && args.plugins == common::plugins_installed()? { let version = common::afl_rustc_version()?; bail!( "AFL LLVM runtime was already built for Rust {version}; run `cargo afl config --build \ diff --git a/cargo-afl/src/main.rs b/cargo-afl/src/main.rs index 3ddf36c6f..c18409c66 100644 --- a/cargo-afl/src/main.rs +++ b/cargo-afl/src/main.rs @@ -182,7 +182,7 @@ fn command_with_afl_version() -> clap::Command { (|| -> Option<()> { let afl_version = afl_version()?; - let with_plugins = common::plugins_available().ok()?; + let with_plugins = common::plugins_installed().ok()?; let subcmd = command.find_subcommand_mut("afl").unwrap(); let ver = format!( @@ -292,7 +292,7 @@ where environment_variables.insert("ASAN_OPTIONS", asan_options); environment_variables.insert("TSAN_OPTIONS", tsan_options); - let has_plugins = common::plugins_available().unwrap(); + let has_plugins = common::plugins_installed().unwrap(); if require_plugins || has_plugins { // Make sure we are on nightly for the -Z flags assert!( @@ -303,7 +303,7 @@ where if require_plugins { assert!( has_plugins, - "AFL++ plugins are not available; run `cargo afl config --build --force --plugins`" + "AFL++ plugins are not installed; run `cargo afl config --build --force --plugins`" ); } diff --git a/cargo-afl/tests/integration.rs b/cargo-afl/tests/integration.rs index e606ea9e1..a271252b6 100644 --- a/cargo-afl/tests/integration.rs +++ b/cargo-afl/tests/integration.rs @@ -61,11 +61,11 @@ fn integration_cfg() { #[test] fn integration_maze() { - if !common::plugins_available().unwrap_or_default() { + if !common::plugins_installed().unwrap_or_default() { #[allow(clippy::explicit_write)] writeln!( std::io::stderr(), - "Skipping `integration_maze` test as plugins are unavailable" + "Skipping `integration_maze` test as plugins are not installed" ) .unwrap(); return; From 9826fb43f659ad336fe9af661a23720144177e8d Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Thu, 21 Aug 2025 05:35:37 -0400 Subject: [PATCH 2/9] Bring back `make clean` --- cargo-afl/src/config.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cargo-afl/src/config.rs b/cargo-afl/src/config.rs index c1ad2bba1..d4b7c73b4 100644 --- a/cargo-afl/src/config.rs +++ b/cargo-afl/src/config.rs @@ -90,13 +90,11 @@ pub fn config(args: &Args) -> Result<()> { fn build_afl(args: &Args, work_dir: &Path) -> Result<()> { // if you had already installed cargo-afl previously you **must** clean AFL++ - // smoelius: AFL++ is now copied to a temporary directory before being built. So `make clean` - // is no longer necessary. let afl_dir = common::afl_dir()?; let mut command = Command::new("make"); command .current_dir(work_dir) - .arg("install") + .args(["clean", "install"]) // skip the checks for the legacy x86 afl-gcc compiler .env("AFL_NO_X86", "1") .env("DESTDIR", afl_dir) @@ -118,7 +116,11 @@ fn build_afl(args: &Args, work_dir: &Path) -> Result<()> { } let success = command.status().as_ref().is_ok_and(ExitStatus::success); - ensure!(success, "could not run 'make install'"); + ensure!( + success, + "could not run 'make clean install' in {}", + work_dir.display() + ); Ok(()) } From c3f327c137b91c637ec68c72c5b1169cb3d562b3 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Thu, 21 Aug 2025 05:51:46 -0400 Subject: [PATCH 3/9] Make `xdg_base_dir` public --- cargo-afl/src/common.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cargo-afl/src/common.rs b/cargo-afl/src/common.rs index 0d08c3695..db0cd4ba8 100644 --- a/cargo-afl/src/common.rs +++ b/cargo-afl/src/common.rs @@ -7,7 +7,10 @@ use std::path::{Path, PathBuf}; pub const OBJECT_FILE_NAME: &str = "afl-compiler-rt.o"; -fn xdg_base_dir() -> xdg::BaseDirectories { +/// Return the [`xdg::BaseDirectories`] used by afl.rs +/// +/// This function is public only for tests. Non-test code should use [`data_dir`], etc. +pub fn xdg_base_dir() -> xdg::BaseDirectories { xdg::BaseDirectories::with_prefix("afl.rs") } From 3bdcbf6d01b2dad453b229d953f3c2feaa0c1e82 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Thu, 21 Aug 2025 12:50:55 -0400 Subject: [PATCH 4/9] Add `copy_aflplusplus_submodule` --- cargo-afl/src/config.rs | 44 +++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/cargo-afl/src/config.rs b/cargo-afl/src/config.rs index d4b7c73b4..5a7a9afbe 100644 --- a/cargo-afl/src/config.rs +++ b/cargo-afl/src/config.rs @@ -53,21 +53,7 @@ pub fn config(args: &Args) -> Result<()> { .is_ok_and(ExitStatus::success); ensure!(success, "could not run 'git'"); } else { - let success = Command::new("cp") - .args([ - "-P", // preserve symlinks - "-R", // copy directories recursively - afl_src_dir_str, - &*tempdir.path().to_string_lossy(), - ]) - .status() - .as_ref() - .is_ok_and(ExitStatus::success); - ensure!( - success, - "could not copy directory `{}`", - afl_src_dir.display() - ); + copy_aflplusplus_submodule(&tempdir.path().join(AFL_SRC_PATH))?; } let work_dir = tempdir.path().join(AFL_SRC_PATH); @@ -88,6 +74,34 @@ pub fn config(args: &Args) -> Result<()> { Ok(()) } +fn copy_aflplusplus_submodule(aflplusplus_dir: &Path) -> Result<()> { + let afl_src_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join(AFL_SRC_PATH); + let afl_src_dir_str = &afl_src_dir.to_string_lossy(); + + let Some(aflplusplus_dir_parent) = aflplusplus_dir.parent() else { + bail!("could not get AFLplusplus dir parent"); + }; + debug_assert_eq!(aflplusplus_dir_parent.join(AFL_SRC_PATH), aflplusplus_dir); + + let success = Command::new("cp") + .args([ + "-P", // preserve symlinks + "-R", // copy directories recursively + afl_src_dir_str, + &*aflplusplus_dir_parent.to_string_lossy(), + ]) + .status() + .as_ref() + .is_ok_and(ExitStatus::success); + ensure!( + success, + "could not copy directory `{}`", + afl_src_dir.display() + ); + + Ok(()) +} + fn build_afl(args: &Args, work_dir: &Path) -> Result<()> { // if you had already installed cargo-afl previously you **must** clean AFL++ let afl_dir = common::afl_dir()?; From cb4a9d653640f1cd542937dd4f5cecb4eda130ce Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Fri, 22 Aug 2025 13:57:23 -0400 Subject: [PATCH 5/9] Change how AFL++ source is managed --- cargo-afl/src/common.rs | 13 ++++ cargo-afl/src/config.rs | 162 ++++++++++++++++++++++++++++++++++------ cargo-afl/src/main.rs | 2 +- 3 files changed, 152 insertions(+), 25 deletions(-) diff --git a/cargo-afl/src/common.rs b/cargo-afl/src/common.rs index db0cd4ba8..ee439142a 100644 --- a/cargo-afl/src/common.rs +++ b/cargo-afl/src/common.rs @@ -60,6 +60,19 @@ pub fn object_file_path() -> Result { afl_llvm_dir().map(|path| path.join(OBJECT_FILE_NAME)) } +pub fn aflplusplus_dir() -> Result { + aflplusplus_dir_from_base_dir(&xdg_base_dir()) +} + +/// Construct the AFLplusplus directory from [`xdg::BaseDirectories`] +/// +/// This function exists only for tests. Non-test code should use [`aflplusplus_dir`]. +pub fn aflplusplus_dir_from_base_dir(base_dir: &xdg::BaseDirectories) -> Result { + base_dir + .create_data_directory("AFLplusplus") + .map_err(Into::into) +} + pub fn plugins_installed() -> Result { let afl_llvm_dir = afl_llvm_dir()?; for result in afl_llvm_dir diff --git a/cargo-afl/src/config.rs b/cargo-afl/src/config.rs index 5a7a9afbe..2e9e560ff 100644 --- a/cargo-afl/src/config.rs +++ b/cargo-afl/src/config.rs @@ -1,5 +1,3 @@ -#![deny(clippy::disallowed_macros, clippy::expect_used, clippy::unwrap_used)] - use anyhow::{Context, Result, bail, ensure}; use clap::Parser; use std::ffi::OsStr; @@ -9,6 +7,7 @@ use std::process::{Command, ExitStatus, Stdio}; use super::common; const AFL_SRC_PATH: &str = "AFLplusplus"; +const AFLPLUSPLUS_URL: &str = "https://github.com/AFLplusplus/AFLplusplus"; #[allow(clippy::struct_excessive_bools)] #[derive(Default, Parser)] @@ -20,19 +19,41 @@ pub struct Args { #[clap(long, help = "Build AFL++ for the default toolchain")] pub build: bool, - #[clap(long, help = "Rebuild AFL++ if it was already built")] + #[clap( + long, + help = "Rebuild AFL++ if it was already built. Note: AFL++ will be built without plugins \ + if `--plugins` is not passed." + )] pub force: bool, #[clap(long, help = "Enable building of LLVM plugins")] pub plugins: bool, + #[clap( + long, + help = "Update to instead of the latest stable version", + requires = "update" + )] + pub tag: Option, + + #[clap( + long, + help = "Update AFL++ to the latest stable version (preserving plugins, if applicable)" + )] + pub update: bool, + #[clap(long, help = "Show build output")] pub verbose: bool, } pub fn config(args: &Args) -> Result<()> { let object_file_path = common::object_file_path()?; - if !args.force && object_file_path.exists() && args.plugins == common::plugins_installed()? { + + if !args.force + && !args.update + && object_file_path.exists() + && args.plugins == common::plugins_installed()? + { let version = common::afl_rustc_version()?; bail!( "AFL LLVM runtime was already built for Rust {version}; run `cargo afl config --build \ @@ -40,40 +61,111 @@ pub fn config(args: &Args) -> Result<()> { ); } - let afl_src_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join(AFL_SRC_PATH); - let afl_src_dir_str = &afl_src_dir.to_string_lossy(); - - let tempdir = tempfile::tempdir().with_context(|| "could not create temporary directory")?; + // smoelius: If updating and AFL++ was built with plugins before, build with plugins again. + let args = Args { + plugins: if args.update { + common::plugins_installed().is_ok_and(|is_true| is_true) + } else { + args.plugins + }, + tag: args.tag.clone(), + ..*args + }; - if afl_src_dir.join(".git").is_dir() { - let success = Command::new("git") - .args(["clone", afl_src_dir_str, &*tempdir.path().to_string_lossy()]) - .status() - .as_ref() - .is_ok_and(ExitStatus::success); - ensure!(success, "could not run 'git'"); - } else { - copy_aflplusplus_submodule(&tempdir.path().join(AFL_SRC_PATH))?; + let aflplusplus_dir = + common::aflplusplus_dir().with_context(|| "could not determine AFLplusplus directory")?; + + // smoelius: The AFLplusplus directory could be in one of three possible states: + // + // 1. Nonexistent + // 2. Initialized with a copy of the AFLplusplus submodule from afl.rs's source tree + // 3. Cloned from `AFLPLUSPLUS_URL` + // + // If we are not updating and the AFLplusplus directory is nonexistent: initialize the directory + // with a copy of the AFLplusplus submodule from afl.rs's source tree (the `else` case in the + // next `if` statement). + // + // If we are updating and the AFLplusplus directory is a copy of the AFLplusplus submodule from + // afl.rs's source tree: remove it and create a new directory by cloning AFL++ (the `else` case + // in `update_to_stable_or_tag`). + // + // Finally, if we are updating: check out either `origin/stable` or the tag that was passed. + if args.update { + let rev_prev = if is_repo(&aflplusplus_dir)? { + rev(&aflplusplus_dir).map(Some)? + } else { + None + }; + + update_to_stable_or_tag(&aflplusplus_dir, args.tag.as_deref())?; + + let rev_curr = rev(&aflplusplus_dir)?; + + if rev_prev == Some(rev_curr) && !args.force { + eprintln!("Nothing to do. Pass `--force` to force rebuilding."); + return Ok(()); + } + } else if !aflplusplus_dir.join(".git").try_exists()? { + copy_aflplusplus_submodule(&aflplusplus_dir)?; } - let work_dir = tempdir.path().join(AFL_SRC_PATH); - - build_afl(args, &work_dir)?; - build_afl_llvm_runtime(args, &work_dir)?; + build_afl(&args, &aflplusplus_dir)?; + build_afl_llvm_runtime(&args, &aflplusplus_dir)?; if args.plugins { - copy_afl_llvm_plugins(args, &work_dir)?; + copy_afl_llvm_plugins(&args, &aflplusplus_dir)?; } let afl_dir = common::afl_dir()?; - let Some(dir) = afl_dir.parent().map(Path::to_path_buf) else { + let Some(afl_dir_parent) = afl_dir.parent() else { bail!("could not get afl dir parent"); }; - eprintln!("Artifacts written to {}", dir.display()); + eprintln!("Artifacts written to {}", afl_dir_parent.display()); Ok(()) } +fn update_to_stable_or_tag(aflplusplus_dir: &Path, tag: Option<&str>) -> Result<()> { + if is_repo(aflplusplus_dir)? { + let success = Command::new("git") + .arg("fetch") + .current_dir(aflplusplus_dir) + .status() + .as_ref() + .is_ok_and(ExitStatus::success); + ensure!(success, "could not run 'git fetch'"); + } else { + remove_aflplusplus_dir(aflplusplus_dir).unwrap_or_default(); + let success = Command::new("git") + .args([ + "clone", + AFLPLUSPLUS_URL, + &*aflplusplus_dir.to_string_lossy(), + ]) + .status() + .as_ref() + .is_ok_and(ExitStatus::success); + ensure!(success, "could not run 'git clone'"); + } + + let mut command = Command::new("git"); + command.arg("checkout"); + if let Some(tag) = tag { + command.arg(tag); + } else { + command.arg("origin/stable"); + } + command.current_dir(aflplusplus_dir); + let success = command.status().as_ref().is_ok_and(ExitStatus::success); + ensure!(success, "could not run 'git checkout'"); + + Ok(()) +} + +fn remove_aflplusplus_dir(aflplusplus_dir: &Path) -> Result<()> { + std::fs::remove_dir_all(aflplusplus_dir).map_err(Into::into) +} + fn copy_aflplusplus_submodule(aflplusplus_dir: &Path) -> Result<()> { let afl_src_dir = Path::new(env!("CARGO_MANIFEST_DIR")).join(AFL_SRC_PATH); let afl_src_dir_str = &afl_src_dir.to_string_lossy(); @@ -102,6 +194,28 @@ fn copy_aflplusplus_submodule(aflplusplus_dir: &Path) -> Result<()> { Ok(()) } +// smoelius: `dot_git` will refer to an ASCII text file if it was copied from the AFLplusplus +// submodule from afl.rs's source tree. +fn is_repo(aflplusplus_dir: &Path) -> Result { + let dot_git = aflplusplus_dir.join(".git"); + if dot_git.try_exists()? { + Ok(dot_git.is_dir()) + } else { + Ok(false) + } +} + +fn rev(dir: &Path) -> Result { + let mut command = Command::new("git"); + command.args(["rev-parse", "HEAD"]); + command.current_dir(dir); + let output = command + .output() + .with_context(|| "could not run `git rev-parse`")?; + ensure!(output.status.success(), "`git rev-parse` failed"); + String::from_utf8(output.stdout).map_err(Into::into) +} + fn build_afl(args: &Args, work_dir: &Path) -> Result<()> { // if you had already installed cargo-afl previously you **must** clean AFL++ let afl_dir = common::afl_dir()?; diff --git a/cargo-afl/src/main.rs b/cargo-afl/src/main.rs index c18409c66..fa2508a6d 100644 --- a/cargo-afl/src/main.rs +++ b/cargo-afl/src/main.rs @@ -104,7 +104,7 @@ declare_afl_subcommand_enum! { Addseeds("Invoke afl-addseeds"), Analyze("Invoke afl-analyze"), Cmin("Invoke afl-cmin"), - Config("Build or rebuild AFL++", config::Args), + Config("Build, rebuild, or update AFL++", config::Args), Fuzz("Invoke afl-fuzz"), Gotcpu("Invoke afl-gotcpu"), Plot("Invoke afl-plot"), From 6fbd21500028476381b99626d57587679903c154 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Fri, 22 Aug 2025 13:58:22 -0400 Subject: [PATCH 6/9] Add tests --- cargo-afl/src/config.rs | 138 ++++++++++++++++++++++++++++++++++++++++ cargo-afl/src/main.rs | 10 +++ 2 files changed, 148 insertions(+) diff --git a/cargo-afl/src/config.rs b/cargo-afl/src/config.rs index 2e9e560ff..a89941cad 100644 --- a/cargo-afl/src/config.rs +++ b/cargo-afl/src/config.rs @@ -330,3 +330,141 @@ fn check_llvm_and_get_config() -> Result { Ok(llvm_config) } + +#[cfg(test)] +mod tests { + use super::{copy_aflplusplus_submodule, remove_aflplusplus_dir, update_to_stable_or_tag}; + use crate::{common, config::is_repo}; + use anyhow::Result; + use assert_cmd::cargo::CommandCargoExt; + use std::{path::Path, process::Command}; + use tempfile::tempdir; + + #[derive(Clone, Copy, Debug)] + enum State { + Nonexistent, + Submodule, + Tag(&'static str), + Stable, + } + + const TESTCASES: &[(State, State, &[&str])] = &[ + // smoelius: There is currently no way to update to the submodule. + // (State::Nonexistent, State::Submodule, &[]), + ( + State::Nonexistent, + State::Tag("v4.33c"), + &[ + #[cfg(not(target_os = "macos"))] + "Note: switching to 'v4.33c'.", + "HEAD is now at", + ], + ), + ( + State::Nonexistent, + State::Stable, + &[ + #[cfg(not(target_os = "macos"))] + "Note: switching to 'origin/stable'.", + "HEAD is now at", + ], + ), + ( + State::Submodule, + State::Tag("v4.33c"), + &[ + #[cfg(not(target_os = "macos"))] + "Note: switching to 'v4.33c'.", + "HEAD is now at", + ], + ), + ( + State::Submodule, + State::Stable, + &[ + #[cfg(not(target_os = "macos"))] + "Note: switching to 'origin/stable'.", + "HEAD is now at", + ], + ), + // smoelius: It should be possible to go from a tag to the stable version. + ( + State::Tag("v4.33c"), + State::Stable, + &["Previous HEAD position was", "HEAD is now at"], + ), + // smoelius: It should be possible to go from the stable version to a tag. + ( + State::Stable, + State::Tag("v4.33c"), + &["Previous HEAD position was", "HEAD is now at"], + ), + ]; + + #[test] + fn update() { + let mut base_dir = common::xdg_base_dir(); + + for &(before, after, line_prefixes) in TESTCASES { + eprintln!("{before:?} -> {after:?}"); + + let tempdir = tempdir().unwrap(); + + // smoelius: Based on https://github.com/whitequark/rust-xdg/issues/44, the recommended + // way of testing with a fake value of `XDG_DATA_HOME` seems to be manually overwriting + // the `data_home` field in `xdg::BaseDirectories`. + base_dir.data_home = Some(tempdir.path().to_path_buf()); + + let aflplusplus_dir = common::aflplusplus_dir_from_base_dir(&base_dir).unwrap(); + + assert!(aflplusplus_dir.starts_with(tempdir.path())); + + set_aflplusplus_dir_contents(before, &aflplusplus_dir).unwrap(); + + let mut command = Command::cargo_bin("cargo-afl").unwrap(); + command.args(["afl", "config", "--update"]); + command.env("XDG_DATA_HOME", tempdir.path()); + match after { + State::Nonexistent | State::Submodule => unreachable!(), + State::Tag(tag) => { + command.args(["--tag", tag]); + } + State::Stable => {} + } + let output = command.output().unwrap(); + assert!(output.status.success()); + let stderr = String::from_utf8(output.stderr).unwrap(); + contains_expected_line_prefixes(&stderr, line_prefixes); + } + } + + fn set_aflplusplus_dir_contents(state: State, aflplusplus_dir: &Path) -> Result<()> { + let result = match state { + State::Nonexistent => remove_aflplusplus_dir(aflplusplus_dir), + State::Submodule => copy_aflplusplus_submodule(aflplusplus_dir), + State::Tag(tag) => update_to_stable_or_tag(aflplusplus_dir, Some(tag)), + State::Stable => update_to_stable_or_tag(aflplusplus_dir, None), + }; + // smoelius: Sanity. + assert!( + is_repo(aflplusplus_dir) + .is_ok_and(|value| value == matches!(state, State::Tag(_) | State::Stable)) + ); + result + } + + fn contains_expected_line_prefixes(stderr: &str, mut line_prefixes: &[&str]) { + for line in stderr.lines() { + if line_prefixes + .first() + .is_some_and(|prefix| line.starts_with(prefix)) + { + line_prefixes = &line_prefixes[1..]; + } + } + assert!( + line_prefixes.is_empty(), + "Could not find line prefix {line_prefixes:?}:\n```\n{stderr}```" + ); + } +} diff --git a/cargo-afl/src/main.rs b/cargo-afl/src/main.rs index fa2508a6d..160c0ed22 100644 --- a/cargo-afl/src/main.rs +++ b/cargo-afl/src/main.rs @@ -535,6 +535,16 @@ mod tests { } } + #[test] + fn tag_requires_update() { + let output = cargo_afl(&["config", "--tag", "v4.33c"]).output().unwrap(); + assert_failure(&output, None); + assert!(String::from_utf8(output.stderr).unwrap().contains( + "error: the following required arguments were not provided: + --update" + )); + } + fn cargo_afl>(args: &[T]) -> Command { let mut command = command(); command.arg("afl").args(args).env("NO_SUDO", "1"); From 27424e1256761d860d59138d0be64ac48ea2d6fd Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Fri, 22 Aug 2025 13:58:43 -0400 Subject: [PATCH 7/9] Make Clippy happy --- clippy.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/clippy.toml b/clippy.toml index e2f44cbe0..57944a8de 100644 --- a/clippy.toml +++ b/clippy.toml @@ -4,3 +4,4 @@ disallowed-macros = [ "std::assert_ne", "std::panic", ] +doc-valid-idents = ["AFLplusplus"] From 53cdc5c865843149e4d3b0aa86a5a14f4b62bcf6 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Tue, 16 Sep 2025 05:36:50 -0400 Subject: [PATCH 8/9] Update version --- Cargo.lock | 4 ++-- afl/Cargo.toml | 2 +- cargo-afl/Cargo.toml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d857e1629..22459354d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,7 +19,7 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "afl" -version = "0.16.0" +version = "0.17.0-rc.2" dependencies = [ "arbitrary", "home", @@ -161,7 +161,7 @@ dependencies = [ [[package]] name = "cargo-afl" -version = "0.16.0" +version = "0.17.0-rc.2" dependencies = [ "anyhow", "assert_cmd", diff --git a/afl/Cargo.toml b/afl/Cargo.toml index 0b9caaaa7..2a818fbf8 100644 --- a/afl/Cargo.toml +++ b/afl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "afl" -version = "0.16.0" +version = "0.17.0-rc.2" readme = "README.md" license = "Apache-2.0" authors = [ diff --git a/cargo-afl/Cargo.toml b/cargo-afl/Cargo.toml index 0f9fe62dc..d8cbeae4c 100644 --- a/cargo-afl/Cargo.toml +++ b/cargo-afl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cargo-afl" -version = "0.16.0" +version = "0.17.0-rc.2" readme = "README.md" license = "Apache-2.0" authors = [ From edaeb7e5b4448fa1b67901035835e617a18668f1 Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Fri, 31 Oct 2025 12:55:59 -0400 Subject: [PATCH 9/9] Update dependencies --- Cargo.lock | 79 ++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 44 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 22459354d..da08a721f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -30,9 +30,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.3" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" dependencies = [ "memchr", ] @@ -144,15 +144,15 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.9.4" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" [[package]] name = "bstr" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "234113d19d0d7d613b40e86fb654acf958910802bcceab913a4f9e7cda03b1a4" +checksum = "63044e1ae8e69f3b5a92c736ca6269b8d12fa7efe39bf34ddb06d102cf0e2cab" dependencies = [ "memchr", "regex-automata", @@ -176,15 +176,15 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" +checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" [[package]] name = "clap" -version = "4.5.50" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2cfd7bf8a6017ddaa4e32ffe7403d547790db06bd171c1c53926faab501623" +checksum = "4c26d721170e0295f191a69bd9a1f93efcdb0aff38684b61ab5750468972e5f5" dependencies = [ "clap_builder", "clap_derive", @@ -192,9 +192,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.50" +version = "4.5.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4c05b9e80c5ccd3a7ef080ad7b6ba7d6fc00a985b8b157197075677c82c7a0" +checksum = "75835f0c7bf681bfd05abe44e965760fea999a5286c6eb2d59883634fd02011a" dependencies = [ "anstream", "anstyle", @@ -216,9 +216,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.5" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" +checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "colorchoice" @@ -261,9 +261,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "doc-comment" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" +checksum = "780955b8b195a21ab8e4ac6b60dd1dbdcec1dc6c51c0617964b08c81785e12c9" [[package]] name = "dtor" @@ -307,14 +307,14 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "libc", "r-efi", - "wasi", + "wasip2", ] [[package]] @@ -340,9 +340,9 @@ dependencies = [ [[package]] name = "is_terminal_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" +checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" [[package]] name = "libc" @@ -403,9 +403,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "once_cell_polyfill" -version = "1.70.1" +version = "1.70.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" +checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" [[package]] name = "predicates" @@ -439,9 +439,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.101" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" +checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8" dependencies = [ "unicode-ident", ] @@ -463,9 +463,9 @@ checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "regex" -version = "1.11.3" +version = "1.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b5288124840bee7b386bc413c487869b360b2b4ec421ea56425128692f2a82c" +checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4" dependencies = [ "aho-corasick", "memchr", @@ -475,9 +475,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.11" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "833eb9ce86d40ef33cb1306d8accf7bc8ec2bfea4355cbdebb3df68b40925cad" +checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c" dependencies = [ "aho-corasick", "memchr", @@ -486,9 +486,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" +checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" [[package]] name = "rustc-demangle" @@ -561,9 +561,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.106" +version = "2.0.108" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" +checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917" dependencies = [ "proc-macro2", "quote", @@ -591,9 +591,9 @@ checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] name = "unicode-ident" -version = "1.0.19" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "utf8parse" @@ -610,15 +610,6 @@ dependencies = [ "libc", ] -[[package]] -name = "wasi" -version = "0.14.7+wasi-0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "883478de20367e224c0090af9cf5f9fa85bed63a95c1abf3afc5c083ebc06e8c" -dependencies = [ - "wasip2", -] - [[package]] name = "wasip2" version = "1.0.1+wasi-0.2.4"