Released YYYY-MM-DD.
- TODO (or remove section if none)
- TODO (or remove section if none)
- TODO (or remove section if none)
- TODO (or remove section if none)
- TODO (or remove section if none)
- TODO (or remove section if none)
Released 2024-02-20.
- Removed the definition of
cfg(fuzzing_repro)
fromcargo fuzz run
on select inputs. This caused too many recompiles in practice during the common fuzzing workflow where you are fuzzing, find a crash, repeatedly run the fuzzer on just the crashing input until you fix the crash, and then start fuzzing in general again and the process repeats.
Released 2024-01-25.
cargo fuzz init
will not put the generated fuzzing crate in a separate workspace by default anymore. There is an option to generate a workspace if that is still the desired behavior:--fuzzing-workspace=true
.
- Fixed
cargo fuzz init
's generated dependencies inCargo.toml
.
Released 2024-01-02.
- Added a "careful mode" inspired by the
cargo-careful
project - Added the ability to use a custom LLVM binaries install path instead of the
default distributed by
rustup
- Improved code coverage collection by using the
-merge=1
option - Reproducing crashes will now build with
---cfg fuzzing_repro
- Initializing a fuzz directory in a workspace is fixed
Released 2023-02-13.
- No longer rebuilds the fuzz target binary for each coverage run.
Released 2022-10-25.
- Fixed the suggested reproducer command outputted by
cargo fuzz tmin
to preserve any build flags (such as sanitizers) the same way thatcargo fuzz fun
's suggested reproducer command will.
Released YYYY-MM-DD.
-
Added the
--no-trace-compares
flag which opts out of the-sanitizer-coverage-trace-compares
LLVM argument.Using this may improve fuzzer throughput at the cost of worse coverage accuracy. It also allows older CPUs lacking the
popcnt
instruction to usecargo-fuzz
; the*-trace-compares
instrumentation assumes that the instruction is available.
Released 2020-05-13.
- Added the
--fuzz-dir <dir>
flag to all subcommands, so that you can put your fuzzing files in a directory other thanmy_crate/fuzz
if you want. #262
Released 2020-04-19.
-
Added the
--strip-dead-code
to allow stripping dead code in the linker.By default, dead code is linked because LLVM's code coverage instrumentation assumes it is present in the coverage maps for some targets. Some code bases, however, require stripping dead code to avoid "undefined symbol" linker errors. This flag allows controlling whether dead code is stripped or not in your build. #260
- The
cargo fuzz coverage
subcommand now passes the raw coverage files to thellvm-profdata
command as a whole directory, rather than as individual files, which avoids an issue where too many command-line arguments were provided in some scenarios. #258
Released 2021-03-10.
- Added the
cargo fuzz coverage
subcommand to generate coverage data for a fuzz target. Learn more in the Coverage chapter of the Rust Fuzzing Book!
Released 2020-06-25.
cargo fuzz build
andcargo fuzz run
default to building with optimizations and debug assertions by default now. This is the most common configuration for running fuzzers, so we've made it the default. To build without optimizations, use the--dev
flag, which enables Cargo's development profile. To build without debug assertions, use the--release
flag, which enables Cargo's release profile.
- Building with memory
sanitizer via the
--sanitizer=memory
flag works correctly now! Previously, we did not rebuildstd
with memory sanitizer enabled, and so programs compiled with memory sanitizer would immediately segfault in practice.
Released 2020-06-09.
- Updated locked dependencies away from yanked versions.
Released 2020-06-09.
- Added a
-v
/--verbose
flag for enabling verbose cargo builds. This was always implicitly enabled before, but now is optional. - New fuzz targets are now configured not to be tested or documented when you
run
cargo test --all
andcargo doc --all
and the fuzz crate is a part of a workspace. Previously, this causedcargo
to accidentally start running the fuzzers.
- The
-sanitizer-coverage-trace-geps
and-sanitizer-coverage-prune-blocks=0
flags are not passed to LLVM anymore, as they created a lot of overhead for fuzz targets, without actually guiding fuzzing much.
Released 2020-03-31.
- Added the
cargo fuzz fmt <target> <input>
subcommand. This prints thestd::fmt::Debug
output of the input. This is especially useful when the fuzz target takes anArbitrary
input type.
Released 2020-02-01.
Released 2020-01-22.
- New projects will be initialized with
libfuzzer-sys
version 0.3.0.
Released 2020-01-15.
- Updated
Cargo.lock
file's self version forcargo-fuzz
, so that building doesn't change the lock file.
Released 2020-01-15.
cargo fuzz
will show you theDebug
output of failing inputs. This is particularly useful when you're usingArbitrary
to create structured fuzz inputs. This requires that your fuzz target is usinglibfuzzer-sys >= 0.2.0
from crates.io.cargo fuzz
will now suggest common next tasks after finding a failing input. It gives you instructions on how to reproduce the failure, and how to run test case minimization.
- New fuzz projects will use
libfuzzer-sys
version0.2.0
from crates.io now, instead of a git dependency. This also pulls inarbitrary
version0.3.0
and all the new goodies it contains.