CMin: don't add to map if it's the initial value (uninteresting) (#1078)

This commit is contained in:
Addison Crump 2023-02-16 17:28:49 +01:00 committed by GitHub
parent 8bffd28b4c
commit f454d17482
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -142,12 +142,14 @@ where
// Store coverage, mapping coverage map indices to hit counts (if present) and the // Store coverage, mapping coverage map indices to hit counts (if present) and the
// associated seeds for the map indices with those hit counts. // associated seeds for the map indices with those hit counts.
for (i, e) in obs.as_iter().copied().enumerate() { for (i, e) in obs.as_iter().copied().enumerate() {
cov_map if e != obs.initial() {
.entry(i) cov_map
.or_insert_with(HashMap::new) .entry(i)
.entry(e) .or_insert_with(HashMap::new)
.or_insert_with(HashSet::new) .entry(e)
.insert(seed_expr.clone()); .or_insert_with(HashSet::new)
.insert(seed_expr.clone());
}
} }
// Keep track of that seed's index and weight // Keep track of that seed's index and weight