Skip to content

Commit

Permalink
Drop '-coverage' from plugin/crate names
Browse files Browse the repository at this point in the history
I don't see a reason for it personally, so I'm going to drop it before I
publish to crates.io.
  • Loading branch information
frewsxcv committed Jan 31, 2016
1 parent 8199403 commit 41d37ed
Show file tree
Hide file tree
Showing 7 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "afl-coverage"
name = "afl"
version = "0.0.1"
readme = "README.md"
license = "Apache-2.0"
Expand All @@ -14,5 +14,5 @@ gcc = "0"
[dev-dependencies]
byteorder = "0"

[dev-dependencies.afl-coverage-plugin]
[dev-dependencies.afl-plugin]
path = "plugin/"
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,26 @@ Because of these relatively strict requirements, there is a Vagrantfile provided
First, add this project as a [Cargo][] dependency:

```toml
[dependencies.afl-coverage-plugin]
[dependencies.afl-plugin]
git = "https://github.com/frewsxcv/afl.rs"

[dependencies.afl-coverage]
[dependencies.afl]
git = "https://github.com/frewsxcv/afl.rs"
```

Then you can add afl instrumentation to one or more crates:

```rust
#![feature(plugin)]
#![plugin(afl_coverage_plugin)]
#![plugin(afl_plugin)]
```

You will also need a test executable that exercises the instrumented functions,
in a deterministic way based on input from stdin. This executable should link
the `afl_coverage` run-time library:
the `afl` run-time library:

```rust
extern crate afl_coverage;
extern crate afl;
```

This will produce a binary that you can pass to `afl-fuzz` in the usual manner.
Expand All @@ -53,13 +53,13 @@ afl instrumentation adds some run-time overhead, so it's a good candidate for
```toml
# You may need to add `optional = true` to the above dependencies.
[features]
afl = ["afl-coverage-plugin", "afl-coverage"]
afl = ["afl-plugin", "afl"]
```

```rust
// Active only with `cargo [...] --feature afl`
#![cfg_attr(feature = "afl", feature(plugin))]
#![cfg_attr(feature = "afl", plugin(afl_coverage_plugin))]
#![cfg_attr(feature = "afl", plugin(afl_plugin))]
```

C++ code will be compiled by default with `g++`, though one can specify a different C++ compiler by setting the `CXX` environment variable to point to a different compiler binary.
Expand All @@ -75,7 +75,7 @@ Rust panic as a crash. Examples of usage:

If your program has a slow set-up phase that does not depend on the input data,
you can set `AFL_DEFER_FORKSRV=1` for a substantial speed-up, provided that you
insert a call to `afl_coverage::init()` after the set-up and before any
insert a call to `afl::init()` after the set-up and before any
dependence on input. There are various other caveats, described in the section
"Bonus feature: deferred instrumentation" in `llvm_mode/README.llvm`
distributed with afl. See also [`examples/deferred-init.rs`][example-defer] in
Expand Down
6 changes: 3 additions & 3 deletions examples/deferred-init.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#![feature(plugin)]

#![plugin(afl_coverage_plugin)]
#![plugin(afl_plugin)]

extern crate afl_coverage;
extern crate afl;

use std::io::{self, Read};
use std::thread;
Expand All @@ -20,7 +20,7 @@ fn main() {
thread::sleep_ms(500);

unsafe {
afl_coverage::init();
afl::init();
}

println!("the blink of an eye.");
Expand Down
4 changes: 2 additions & 2 deletions examples/hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@

#![feature(plugin)]

#![plugin(afl_coverage_plugin)]
#![plugin(afl_plugin)]

extern crate afl_coverage;
extern crate afl;

use std::io::{self, Read};

Expand Down
4 changes: 2 additions & 2 deletions examples/integer-overflow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@

#![feature(plugin, raw)]

#![plugin(afl_coverage_plugin)]
#![plugin(afl_plugin)]

// Integer overflow bug.
// Loosely based on:
// https://github.com/sandstorm-io/capnproto/blob/master/security-advisories/2015-03-02-0-c%2B%2B-integer-overflow.md

extern crate afl_coverage;
extern crate afl;
extern crate byteorder;

use std::{mem, io, raw};
Expand Down
4 changes: 2 additions & 2 deletions examples/panic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#![feature(plugin)]

#![plugin(afl_coverage_plugin)]
#![plugin(afl_plugin)]

extern crate afl_coverage;
extern crate afl;

use std::io::{self, Read};

Expand Down
4 changes: 2 additions & 2 deletions plugin/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "afl-coverage-plugin"
name = "afl-plugin"
version = "0.0.1"
license = "Apache-2.0"
authors = ["Keegan McAllister <mcallister.keegan@gmail.com>"]
build = "build.rs"

[lib]
name = "afl_coverage_plugin"
name = "afl_plugin"
plugin = true

0 comments on commit 41d37ed

Please sign in to comment.