From efee4ed2240b89b4959ac8a0490a88f26e7ab506 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Mon, 1 Jul 2024 15:52:47 +0200 Subject: 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. --- pkg/fuzzer/job.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'pkg/fuzzer') 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 { -- cgit mrf-deployment