pub struct CoverageBitmap {
pub edges: Vec<u8>,
pub covered_edges: usize,
}Expand description
AFL-style coverage bitmap (65536 entries is standard)
Fields§
§edges: Vec<u8>Hit counts for each edge (reduce to 0-255 in AFL style)
covered_edges: usizeTotal edges with non-zero hit count
Implementations§
Source§impl CoverageBitmap
impl CoverageBitmap
pub fn new() -> Self
Sourcepub fn record_edge(&mut self, prev: usize, cur: usize) -> bool
pub fn record_edge(&mut self, prev: usize, cur: usize) -> bool
Record an edge transition (prev → cur)
Sourcepub fn has_new_coverage(&self, global: &CoverageBitmap) -> bool
pub fn has_new_coverage(&self, global: &CoverageBitmap) -> bool
Check if this bitmap has new coverage compared to the global one
Sourcepub fn merge(&mut self, global: &CoverageBitmap)
pub fn merge(&mut self, global: &CoverageBitmap)
Merge global coverage with this bitmap
Trait Implementations§
Source§impl Clone for CoverageBitmap
impl Clone for CoverageBitmap
Source§fn clone(&self) -> CoverageBitmap
fn clone(&self) -> CoverageBitmap
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CoverageBitmap
impl Debug for CoverageBitmap
Source§impl Default for CoverageBitmap
impl Default for CoverageBitmap
Source§impl<'de> Deserialize<'de> for CoverageBitmap
impl<'de> Deserialize<'de> for CoverageBitmap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CoverageBitmap
impl RefUnwindSafe for CoverageBitmap
impl Send for CoverageBitmap
impl Sync for CoverageBitmap
impl Unpin for CoverageBitmap
impl UnsafeUnpin for CoverageBitmap
impl UnwindSafe for CoverageBitmap
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more