Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Command line helpers for fuzzing

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

rust-fuzz/cargo-fuzz

Acargo subcommand for fuzzing withlibFuzzer! Easy to use!

Installation

$ cargo install cargo-fuzz

Note:libFuzzer needs LLVM sanitizer support, so this only works on x86-64 and Aarch64,and only on Unix-like operating systems (not Windows). This also needs a nightly compiler since it uses someunstable command-line flags. You'll also need a C++ compiler with C++11 support.

Usage

cargo fuzz init

Initialize acargo fuzz project for your crate!

If your crate uses cargo workspaces, addfuzz directory toworkspace.members in rootCargo.toml

fuzz directory can be either a part of an existing workspace (default)or use an independent workspace. If latter is desired, you can usecargo fuzz init --fuzzing-workspace=true.

cargo fuzz add <target>

Create a new fuzzing target!

cargo fuzz run <target>

Run a fuzzing target and find bugs!

cargo fuzz fmt <target> <input>

Print thestd::fmt::Debug output for a test case. Useful when your fuzz targettakes anArbitrary input!

cargo fuzz tmin <target> <input>

Found a failing input? Minify it to the smallest input that causes that failurefor easier debugging!

cargo fuzz cmin <target>

Minify your corpus of input files!

cargo fuzz coverage <target>

Generate coverage information on the fuzzed program!

Documentation

Documentation can be found in theRust FuzzBook.

You can also always find the full command-line options that are available with--help:

$ cargo fuzz --help

Trophy case

The trophy case has a list of bugsfound bycargo fuzz (and others). Didcargo fuzz and libFuzzer find a bugfor you? Add it to the trophy case!

License

cargo-fuzz is distributed under the terms of both the MIT license and theApache License (Version 2.0).

SeeLICENSE-APACHE andLICENSE-MIT fordetails.


[8]ページ先頭

©2009-2025 Movatter.jp