Skip to content

Commit 497948e

Browse files
author
Ethan Graham
committed
pkg/kfuzztest: fix coverage collection and output
1 parent 27736ac commit 497948e

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

pkg/corpus/corpus.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,3 +260,7 @@ func (corpus *Corpus) ProgsPerArea() map[string]int {
260260
}
261261
return ret
262262
}
263+
264+
func (corpus *Corpus) Cover() []uint64 {
265+
return corpus.cover.Serialize()
266+
}

pkg/kfuzztest-manager/manager.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ FuzzLoop:
173173
}
174174

175175
func (mgr *kFuzzTestManager) writePCs(filepath string) error {
176-
sigs := mgr.fuzzer.Load().Cover.CopyMaxSignal()
176+
sigs := mgr.fuzzer.Load().Config.Corpus.Cover()
177177
pcs := []uint64{}
178-
for sig := range sigs {
179-
pcs = append(pcs, uint64(sig))
178+
for _, sig := range sigs {
179+
pcs = append(pcs, sig)
180180
}
181181
slices.Sort(pcs)
182182
var builder strings.Builder

0 commit comments

Comments
 (0)