From 8fa0c867d4e4bbd97321b19ac11115fa7020570a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 20 Oct 2017 12:23:21 +0200 Subject: syz-fuzzer: generates hints only for the call that gave new coverage During smashing we know what call gave new coverage, so we can concentrate just on it. This helps to reduce amount of hints generated (we have too many of them). --- prog/hints_test.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'prog/hints_test.go') diff --git a/prog/hints_test.go b/prog/hints_test.go index 31cc13889..9e5c88343 100644 --- a/prog/hints_test.go +++ b/prog/hints_test.go @@ -343,18 +343,17 @@ func TestHintsRandom(t *testing.T) { r := newRand(target, rs) for i := 0; i < iters; i++ { p := target.Generate(rs, 5, nil) - comps := make([]CompMap, len(p.Calls)) for i, c := range p.Calls { vals := extractValues(c) for j := 0; j < 5; j++ { vals[r.randInt()] = true } - comps[i] = make(CompMap) + comps := make(CompMap) for v := range vals { - comps[i].AddComp(v, r.randInt()) + comps.AddComp(v, r.randInt()) } + p.MutateWithHints(i, comps, func(p1 *Prog) {}) } - p.MutateWithHints(comps, func(p1 *Prog) {}) } } -- cgit mrf-deployment