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.go | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'prog/hints.go') diff --git a/prog/hints.go b/prog/hints.go index 5a05d7f56..87b92229d 100644 --- a/prog/hints.go +++ b/prog/hints.go @@ -47,15 +47,14 @@ func (m CompMap) AddComp(arg1, arg2 uint64) { // Mutates the program using the comparison operands stored in compMaps. // For each of the mutants executes the exec callback. -func (p *Prog) MutateWithHints(compMaps []CompMap, exec func(newP *Prog)) { - for i, c := range p.Calls { - if c.Meta == p.Target.MmapSyscall { - continue - } - foreachArg(c, func(arg, _ Arg, _ *[]Arg) { - generateHints(p, compMaps[i], c, arg, exec) - }) +func (p *Prog) MutateWithHints(callIndex int, comps CompMap, exec func(newP *Prog)) { + c := p.Calls[callIndex] + if c.Meta == p.Target.MmapSyscall { + return } + foreachArg(c, func(arg, _ Arg, _ *[]Arg) { + generateHints(p, comps, c, arg, exec) + }) } func generateHints(p *Prog, compMap CompMap, c *Call, arg Arg, exec func(p *Prog)) { -- cgit mrf-deployment