Trait libafl::observers::cmp::CmpObserverMetadata

source ·
pub trait CmpObserverMetadata<'a, CM>: SerdeAny + Debug
where CM: CmpMap + Debug,
{ type Data: 'a + Debug + Default + Serialize + DeserializeOwned; // Required methods fn new_metadata() -> Self; fn add_from( &mut self, usable_count: usize, cmp_map: &mut CM, cmp_observer_data: Self::Data ); }
Expand description

Generic metadata trait for use in a CmpObserver, which adds comparisons from a CmpObserver primarily intended for use with AFLppCmpValuesMetadata or CmpValuesMetadata

Required Associated Types§

source

type Data: 'a + Debug + Default + Serialize + DeserializeOwned

Extra data used by the metadata when adding information from a CmpObserver, for example the original field in AFLppCmpLogObserver

Required Methods§

source

fn new_metadata() -> Self

Instantiate a new metadata instance. This is used by CmpObserver to create a new metadata if one is missing and add_meta is specified. This will typically juse call new()

source

fn add_from( &mut self, usable_count: usize, cmp_map: &mut CM, cmp_observer_data: Self::Data )

Add comparisons to a metadata from a CmpObserver. cmp_map is mutable in case it is needed for a custom map, but this is not utilized for CmpObserver or AFLppCmpLogObserver.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<'a, CM> CmpObserverMetadata<'a, CM> for CmpValuesMetadata
where CM: CmpMap,

§

type Data = bool