STEP_LOCK

Constant STEP_LOCK 

Source
const STEP_LOCK: LocalKey<Cell<Option<StepIndex>>>;
Expand description

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.