MCPcopy Create free account
hub / github.com/MultiFuzz/MultiFuzz / with_strategy

Method with_strategy

hail-fuzz/src/coverage.rs:143–159  ·  view source on GitHub ↗
(vm: &mut Vm, config: &FuzzConfig, strategy: BucketStrategy)

Source from the content-addressed store, hash-verified

141 }
142
143 pub fn with_strategy(vm: &mut Vm, config: &FuzzConfig, strategy: BucketStrategy) -> Self {
144 let bitmap = Box::leak(init_coverage_array());
145
146 let (start_addr, end_addr) = config.get_instrumentation_range(vm).unwrap_or((0, u64::MAX));
147 let storage = icicle_fuzzing::coverage::AFLHitCountsBuilder::new()
148 .filter(move |block| start_addr <= block.start && block.start <= end_addr)
149 .finish(vm, bitmap as *mut u64 as *mut u8, MAP_SIZE as u32);
150
151 if let Some(level) = config.compcov_level {
152 icicle_fuzzing::compcov::CompCovBuilder::new()
153 .filter(move |block| start_addr <= block.start && block.start <= end_addr)
154 .level(level)
155 .finish(vm, storage);
156 }
157
158 Self { hit: init_coverage_array(), count: 0, storage, strategy }
159 }
160}
161
162impl Coverage for EdgeCountMap {

Callers

nothing calls this directly

Calls 1

init_coverage_arrayFunction · 0.85

Tested by

no test coverage detected