Module utils

Module utils 

Source

Structsยง

TermConstraints
Size budget for terms and traces during mutation.

Constantsยง

STEP_LOCK ๐Ÿ”’
Per-stage anchor step lock. When set to Some(k), every anchor drawn by reservoir_sample โ€“ and therefore all choose* helpers built on it โ€“ is restricted to step k. Set by crate::fuzzer::stages::StepLockedStackMutator so that all mutations stacked in one mutational stage edit the SAME step. Global/Step fan-out (via find_all_term_filtered / find_all_sub_term_filtered) does NOT consult this lock, so a Global mutation still spreads its effect across the whole trace โ€“ only its anchor choice is confined to the locked step. Safe as a thread-local: LibAFL runs a single mutation thread per fuzzer process (one process per core), so there is no cross-trace interference.

Traitsยง

Choosable

Functionsยง

choose
choose_filtered
choose_iter
choose_mut
choose_term
choose_term_filtered_mut
choose_term_mut
choose_term_path
choose_term_path_filtered
collect_subterms ๐Ÿ”’
Post-order half of find_all_sub_term_filtered: same bottom-up size fold and in-place path as sample_subterms, collecting every matching path instead of sampling one.
find_all_sub_term_filtered
Finds all sub-terms in a given term that satisfy a filtering condition and term constraints.
find_all_term_filtered
Finds all trace paths in a trace that satisfy a given filter predicate and term constraints.
find_term
find_term_by_term_path
find_term_by_term_path_mut
find_term_mut
reservoir_sample
https://en.wikipedia.org/wiki/Reservoir_sampling#Simple_algorithm
sample_subterms ๐Ÿ”’
Post-order half of reservoir_sample: offers every selectable sub-term of term to the reservoir and returns termโ€™s TermType::size.
set_step_lock
Set (or clear, with None) the process-local anchor step lock. Returns the previous value so the caller can restore it after the stage.
step_lock
Read the current anchor step lock (None when unlocked).

Type Aliasesยง

StepIndex
TermPath
TracePath