pub(crate) struct FuzzingTrace {
trace: Vec<u32>,
branch_to_feature_map: HashMap<(usize, usize), usize>,
}Expand description
Context structure for all information necessary to compute the fuzzing trace
Fields§
§trace: Vec<u32>Fuzzer tracing memory.
It records each time a key in the branch_to_feature_map was observed.
Its length is equal to that of the branch_to_feature_map.
branch_to_feature_map: HashMap<(usize, usize), usize>Branch to feature map for fuzzing. Maps program counter + feature to index in the trace vector.
Implementations§
Source§impl FuzzingTrace
impl FuzzingTrace
fn branch_state(cond: bool) -> usize
fn log_range_state(log: usize) -> usize
pub(crate) fn new(branch_to_feature_map: HashMap<(usize, usize), usize>) -> Self
fn record_branch(&mut self, pc: usize, destination: usize)
fn record_conditional_mov(&mut self, pc: usize, branch: bool)
fn record_binary_field_op_comparison<F: AcirField>( &mut self, pc: usize, op: &BinaryFieldOp, lhs: MemoryValue<F>, rhs: MemoryValue<F>, result: MemoryValue<F>, )
fn record_binary_int_op_comparison<F: AcirField>( &mut self, pc: usize, op: &BinaryIntOp, lhs: MemoryValue<F>, rhs: MemoryValue<F>, result: MemoryValue<F>, )
pub(crate) fn get_trace(&self) -> Vec<u32>
Trait Implementations§
Source§impl Clone for FuzzingTrace
impl Clone for FuzzingTrace
Source§fn clone(&self) -> FuzzingTrace
fn clone(&self) -> FuzzingTrace
Returns a duplicate of the value. Read more
1.0.0 · 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 FuzzingTrace
impl Debug for FuzzingTrace
Source§impl Default for FuzzingTrace
impl Default for FuzzingTrace
Source§fn default() -> FuzzingTrace
fn default() -> FuzzingTrace
Returns the “default value” for a type. Read more
Source§impl PartialEq for FuzzingTrace
impl PartialEq for FuzzingTrace
impl Eq for FuzzingTrace
impl StructuralPartialEq for FuzzingTrace
Auto Trait Implementations§
impl Freeze for FuzzingTrace
impl RefUnwindSafe for FuzzingTrace
impl Send for FuzzingTrace
impl Sync for FuzzingTrace
impl Unpin for FuzzingTrace
impl UnwindSafe for FuzzingTrace
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
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