Skip to content

Commit

Permalink
pkg/fuzzer: speed up triage jobs
Browse files Browse the repository at this point in the history
If we have found new signal for several calls of the same programs,
triage them in paralllel.
  • Loading branch information
a-nogikh committed Jul 17, 2024
1 parent 099fe5a commit e8048e9
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/fuzzer/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ package fuzzer

import (
"math/rand"
"sync"

"github.com/google/syzkaller/pkg/corpus"
"github.com/google/syzkaller/pkg/cover"
Expand Down Expand Up @@ -98,9 +99,16 @@ func (job *triageJob) run(fuzzer *Fuzzer) {
if stop {
return
}
var wg sync.WaitGroup
for call, info := range job.calls {
job.handleCall(call, info)
call, info := call, info
wg.Add(1)
go func() {
job.handleCall(call, info)
wg.Done()
}()
}
wg.Wait()
}

func (job *triageJob) handleCall(call int, info *triageCall) {
Expand Down

0 comments on commit e8048e9

Please sign in to comment.