Skip to content

Commit

Permalink
Differential executor, diff feedback, stdio observers for command exe…
Browse files Browse the repository at this point in the history
…cutor (#521)

* started diff fuzzer

* finished DifferentialExecutor

* adapt builder, more diff fuzz infra

* diff eq feedback

* stdout observer started:

* stdio observers

* stdio observers

* no_std, fixes

* no_std tests
  • Loading branch information
domenukk committed Feb 6, 2022
1 parent 1fca710 commit 98fbe83
Show file tree
Hide file tree
Showing 12 changed files with 638 additions and 91 deletions.
10 changes: 9 additions & 1 deletion libafl/src/bolts/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use std::os::unix::prelude::{AsRawFd, RawFd};
use crate::Error;

/// The default filename to use to deliver testcases to the target
pub const DEFAULT_OUTFILE: &str = ".cur_input";
pub const OUTFILE_STD: &str = ".cur_input";

/// Creates a `.{file_name}.tmp` file, and writes all bytes to it.
/// After all bytes have been written, the tmp-file is moved to it's original `path`.
Expand Down Expand Up @@ -55,6 +55,14 @@ pub struct OutFile {
pub file: File,
}

impl Eq for OutFile {}

impl PartialEq for OutFile {
fn eq(&self, other: &Self) -> bool {
self.path == other.path
}
}

impl Clone for OutFile {
fn clone(&self) -> Self {
Self {
Expand Down
2 changes: 1 addition & 1 deletion libafl/src/bolts/os/unix_signals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ pub fn ucontext() -> Result<ucontext_t, Error> {
} else {
#[cfg(not(feature = "std"))]
unsafe {
libc::perror(b"Failed to get ucontext\n".as_ptr() as _)
libc::perror(b"Failed to get ucontext\n".as_ptr() as _);
};
#[cfg(not(feature = "std"))]
return Err(Error::Unknown("Failed to get ucontex".into()));
Expand Down
1 change: 1 addition & 0 deletions libafl/src/executors/combined.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! A `CombinedExecutor` wraps a primary executor and a secondary one
//! In comparison to the [`crate::executors::DiffExecutor`] it does not run the secondary executor in `run_target`.

use crate::{
executors::{Executor, ExitKind, HasObservers},
Expand Down
Loading

0 comments on commit 98fbe83

Please sign in to comment.