diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2024-07-01 15:52:47 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2024-07-15 14:02:00 +0000 |
| commit | efee4ed2240b89b4959ac8a0490a88f26e7ab506 (patch) | |
| tree | 93ed7c883816530385b1776229ffa978fd9cf9e4 /pkg/fuzzer | |
| parent | b930f376a2e25f0db4fa2086cd2efc224aa50f8a (diff) | |
pkg/fuzzer: deflake hints 3 times instead of 2
Hints can produce insane amounts of candidates (up to 30K).
So run deflaking one more time, even if it reduces amount
of candidates by few percents, it's still profitable.
Diffstat (limited to 'pkg/fuzzer')
| -rw-r--r-- | pkg/fuzzer/job.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/pkg/fuzzer/job.go b/pkg/fuzzer/job.go index d1397c5b2..37aaef7d4 100644 --- a/pkg/fuzzer/job.go +++ b/pkg/fuzzer/job.go @@ -390,27 +390,27 @@ type hintsJob struct { } func (job *hintsJob) run(fuzzer *Fuzzer) { - // First execute the original program twice to get comparisons from KCOV. - // The second execution lets us filter out flaky values, which seem to constitute ~30-40%. + // First execute the original program several times to get comparisons from KCOV. + // Additional executions lets us filter out flaky values, which seem to constitute ~30-40%. p := job.p var comps prog.CompMap - for i := 0; i < 2; i++ { + for i := 0; i < 3; i++ { result := fuzzer.execute(job.exec, &queue.Request{ Prog: p, ExecOpts: setFlags(flatrpc.ExecFlagCollectComps), Stat: fuzzer.statExecSeed, }) - if result.Stop() || result.Info == nil { + if result.Stop() { return } + if result.Info == nil || len(result.Info.Calls[job.call].Comps) == 0 { + continue + } got := make(prog.CompMap) for _, cmp := range result.Info.Calls[job.call].Comps { got.AddComp(cmp.Op1, cmp.Op2) } - if len(got) == 0 { - return - } if i == 0 { comps = got } else { |
