From 0d231ceb731d89cab71f6ad2ad1aa9d766b2e243 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Sun, 17 Dec 2017 18:34:17 +0100 Subject: syz-fuzzer: refactor syz-fuzzer organically grew from a small nice main function into a huge single-file monster with tons of global state. Start refactoring it into something more managable. This change separates 2 things: 1. Proc: a single fuzzing process (ipc.Env wrapper). 2. WorkQueue: holds global non-fuzzing work items. More work needed, but this is good first step. --- tools/syz-execprog/execprog.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index ff0ceb4ca..ef5a0479a 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -184,13 +184,12 @@ func main() { } } if *flagHints { - compMaps := ipc.GetCompMaps(info) ncomps, ncandidates := 0, 0 for i := range entry.P.Calls { if *flagOutput == "stdout" { fmt.Printf("call %v:\n", i) } - comps := compMaps[i] + comps := info[i].Comps for v, args := range comps { ncomps += len(args) if *flagOutput == "stdout" { -- cgit mrf-deployment