(vm: &mut Vm, config: &FuzzConfig, strategy: BucketStrategy)
| 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 | |
| 162 | impl Coverage for EdgeCountMap { |
nothing calls this directly
no test coverage detected