diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2018-11-22 20:43:38 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-11-23 07:17:29 +0100 |
| commit | 2b0dc848a0b874fa0fe431786cafdb4bd9a152c6 (patch) | |
| tree | 8192433da1303ed96c10e0f85206a37a81f3f450 /tools | |
| parent | 87815d9d3240b653160e1eb4e5a6931c0c3bd0d9 (diff) | |
ipc: fix ProgInfo usage better
Fix a bad fix for ProgInfo usage.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/syz-execprog/execprog.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go index 310492ed0..5965677be 100644 --- a/tools/syz-execprog/execprog.go +++ b/tools/syz-execprog/execprog.go @@ -148,17 +148,17 @@ func (ctx *Context) execute(pid int, env *ipc.Env, entry *prog.LogEntry) { log.Logf(0, "result: failed=%v hanged=%v err=%v\n\n%s", failed, hanged, err, output) } - if info == nil || len(info.Calls) != 0 { + if info != nil && len(info.Calls) != 0 { ctx.printCallResults(info) if *flagHints { ctx.printHints(entry.P, info) } + if *flagCoverFile != "" { + ctx.dumpCoverage(*flagCoverFile, info) + } } else { log.Logf(1, "RESULT: no calls executed") } - if *flagCoverFile != "" { - ctx.dumpCoverage(*flagCoverFile, info) - } } func (ctx *Context) logProgram(pid int, p *prog.Prog, callOpts *ipc.ExecOpts) { |
