[][src]Struct lain::driver::FuzzerDriver

pub struct FuzzerDriver<T> { /* fields omitted */ }

Helper to manage fuzzer threads, thread state, and global state.

Methods

impl<T: 'static + Send + Sync> FuzzerDriver<T>[src]

pub fn new(num_threads: usize) -> Self[src]

Instantiates new FuzzerDriver with the specified number of threads and uses the thread-local RNG to generate a seed

pub fn thread_count(&self) -> usize[src]

pub fn set_to_reproduce_mode(
    &mut self,
    start_iteration: u64,
    end_iteration: u64
)
[src]

Sets the driver mode to attempt to reproduce a crash. When start_fuzzer is called, the routine will configure each thread's RNG state to match what it was at start_iteration, the threads will begin to run, and end at end_iteration.

pub fn num_iterations(&self) -> usize[src]

Returns the total number of fuzzing iterations overall.

pub fn set_iterations(&self, iterations: usize)[src]

Sets the current iteration

pub fn num_failed_iterations(&self) -> usize[src]

Returns the number of iterations that returned an error result

pub fn set_global_context(&mut self, context: Arc<RwLock<T>>)[src]

pub fn global_context(&self) -> Option<Arc<RwLock<T>>>[src]

pub fn set_seed(&mut self, seed: u64)[src]

Sets the root seed

pub fn seed(&self) -> u64[src]

The root seed

pub fn signal_exit(&self)[src]

Signals that all threads should be exiting

pub fn join_threads(&self)[src]

Waits for all fuzzing threads to join

pub fn mode(&self) -> DriverMode[src]

pub fn check_for_stalled_threads(&self) -> bool[src]

Returns a bool indicating whether any threads have a last execution time > NOW() - timeout

pub fn set_thread_timeout(&mut self, duration: Duration)[src]

Sets the max duration before a thread is flagged as stalled

Trait Implementations

impl<T: 'static + Send + Sync> Default for FuzzerDriver<T>[src]

fn default() -> Self[src]

Instantiates new FuzzerDriver with 1 thread per logical CPU and uses the thread-local RNG to generate a seed

Auto Trait Implementations

impl<T> Sync for FuzzerDriver<T> where
    T: Send + Sync

impl<T> Send for FuzzerDriver<T> where
    T: Send + Sync

impl<T> Unpin for FuzzerDriver<T>

impl<T> RefUnwindSafe for FuzzerDriver<T>

impl<T> UnwindSafe for FuzzerDriver<T>

Blanket Implementations

impl<T> Fixup for T[src]

impl<T> VariableSizeObject for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,