Struct lain::driver::FuzzerDriver [−][src]
pub struct FuzzerDriver<T> { /* fields omitted */ }
Expand description
Helper to manage fuzzer threads, thread state, and global state.
Implementations
impl<T: 'static + Send + Sync> FuzzerDriver<T>
[src]
impl<T: 'static + Send + Sync> FuzzerDriver<T>
[src]pub fn new(num_threads: usize) -> Self
[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]
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]
pub fn num_iterations(&self) -> usize
[src]Returns the total number of fuzzing iterations overall.
pub fn set_iterations(&self, iterations: usize)
[src]
pub fn set_iterations(&self, iterations: usize)
[src]Sets the current iteration
pub fn num_failed_iterations(&self) -> usize
[src]
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 signal_exit(&self)
[src]
pub fn signal_exit(&self)
[src]Signals that all threads should be exiting
pub fn join_threads(&self)
[src]
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]
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]
pub fn set_thread_timeout(&mut self, duration: Duration)
[src]Sets the max duration before a thread is flagged as stalled
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for FuzzerDriver<T>
impl<T> Send for FuzzerDriver<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Sync for FuzzerDriver<T> where
T: Send + Sync,
T: Send + Sync,
impl<T> Unpin for FuzzerDriver<T>
impl<T> UnwindSafe for FuzzerDriver<T>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> VariableSizeObject for T
[src]
impl<T> VariableSizeObject for T
[src]