Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Differential executor, diff feedback, stdio observers for command executor #521

Merged
merged 10 commits into from
Feb 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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