Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rmalmain authored Aug 9, 2024
2 parents ea89c94 + 799c634 commit 09a95b3
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
16 changes: 16 additions & 0 deletions libafl/src/feedbacks/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,6 +818,16 @@ where
}
}

impl<A, S, T> FeedbackFactory<NotFeedback<A, S>, T> for NotFeedback<A, S>
where
A: Feedback<S> + FeedbackFactory<A, T>,
S: State,
{
fn create_feedback(&self, ctx: &T) -> NotFeedback<A, S> {
NotFeedback::new(self.first.create_feedback(ctx))
}
}

impl<A, S> NotFeedback<A, S>
where
A: Feedback<S>,
Expand Down Expand Up @@ -1279,6 +1289,12 @@ impl From<ConstFeedback> for bool {
}
}

impl<T> FeedbackFactory<ConstFeedback, T> for ConstFeedback {
fn create_feedback(&self, _ctx: &T) -> ConstFeedback {
*self
}
}

#[cfg(feature = "track_hit_feedbacks")]
/// Error if [`Feedback::last_result`] is called before the `Feedback` is actually run.
pub(crate) fn premature_last_result_err() -> Error {
Expand Down
8 changes: 3 additions & 5 deletions libafl_cc/src/dump-cfg-pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,11 @@ class DumpCfgPass : public ModulePass {
#else
if (n.startswith("llvm.")) {
#endif
return true;
} else {
return false;
}
return true;
}
else {
return false;
}
}
};

} // namespace
Expand Down

0 comments on commit 09a95b3

Please sign in to comment.