Trigger feedback side effects during force-loading (#1317)

* this triggers feedback side effects during force-loading

* oops; correct typo in introspection branch

---------

Co-authored-by: Dongjia "toka" Zhang <tokazerkje@outlook.com>
This commit is contained in:
Andrew-Fryer 2023-06-16 20:06:07 -04:00 committed by GitHub
parent dad8217c38
commit 07530fea57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -507,6 +507,27 @@ where
let observers = executor.observers(); let observers = executor.observers();
// Always consider this to be "interesting" // Always consider this to be "interesting"
// However, we still want to trigger the side effects of objectives and feedbacks.
#[cfg(not(feature = "introspection"))]
let _is_solution = self
.objective_mut()
.is_interesting(state, manager, &input, observers, &exit_kind)?;
#[cfg(feature = "introspection")]
let _is_solution = self
.objective_mut()
.is_interesting_introspection(state, manager, &input, observers, &exit_kind)?;
#[cfg(not(feature = "introspection"))]
let _is_corpus = self
.feedback_mut()
.is_interesting(state, manager, &input, observers, &exit_kind)?;
#[cfg(feature = "introspection")]
let _is_corpus = self
.feedback_mut()
.is_interesting_introspection(state, manager, &input, observers, &exit_kind)?;
// Not a solution // Not a solution
self.objective_mut().discard_metadata(state, &input)?; self.objective_mut().discard_metadata(state, &input)?;