Observers
An Observer in LibAFL implements the
Observer
trait. An
Observer
is very
generic and does essentially what it sounds like: observes some state.
Observer
s
optionally implement methods that are called on events that occur each fuzzing iteration
like pre_exec
, post_exec
, and so forth.
The most familiar Observer
type is the HitcountsMapObserver
that observes a region of memory (a bitmap) whose entries are
incremented each time an edge or block is hit during a target execution. This is the
model AFL++ uses by default.
Observer
s can
also observe other observes, that is, they can be nested. For example, a HitcountsMapObserver
observes a
MapObserver
and adds post-processing of hitcounts instead of the raw map data.
We can use one of the many provided implementations, or we can define our own, like with everything in LibAFL.