From 4bd78cef058ec8782ed0a8b4f2596f4748dbb575 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 14 Nov 2017 10:04:22 +0100 Subject: pkg/report, pkg/repro, syz-manager: name crash attributes consistently We currently have several names for crash attributes, which is disturbing. E.g. crash title is called "Title" or "Desc". Name them consistently. Title - single line bug identity. Report - whole crash text. Log - whole fuzzer/kernel output. --- tools/syz-crush/crush.go | 6 +++--- tools/syz-symbolize/symbolize.go | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tools') diff --git a/tools/syz-crush/crush.go b/tools/syz-crush/crush.go index 34f700bb3..b349e50bc 100644 --- a/tools/syz-crush/crush.go +++ b/tools/syz-crush/crush.go @@ -109,14 +109,14 @@ func runInstance(cfg *mgrconfig.Config, reporter report.Reporter, vmPool *vm.Poo } log.Logf(0, "vm-%v: crushing...", index) - desc, _, output, crashed, timedout := vm.MonitorExecution(outc, errc, reporter) + title, _, output, crashed, timedout := vm.MonitorExecution(outc, errc, reporter) if timedout { // This is the only "OK" outcome. log.Logf(0, "vm-%v: running long enough, restarting", index) } else { if !crashed { // syz-execprog exited, but it should not. - desc = "lost connection to test machine" + title = "lost connection to test machine" } f, err := ioutil.TempFile(".", "syz-crush") if err != nil { @@ -124,7 +124,7 @@ func runInstance(cfg *mgrconfig.Config, reporter report.Reporter, vmPool *vm.Poo return } defer f.Close() - log.Logf(0, "vm-%v: crashed: %v, saving to %v", index, desc, f.Name()) + log.Logf(0, "vm-%v: crashed: %v, saving to %v", index, title, f.Name()) f.Write(output) } return diff --git a/tools/syz-symbolize/symbolize.go b/tools/syz-symbolize/symbolize.go index e925159d2..d8a77691c 100644 --- a/tools/syz-symbolize/symbolize.go +++ b/tools/syz-symbolize/symbolize.go @@ -43,14 +43,14 @@ func main() { fmt.Fprintf(os.Stderr, "no crash found\n") os.Exit(1) } - text = rep.Text + text = rep.Report text, err = reporter.Symbolize(text) if err != nil { fmt.Fprintf(os.Stderr, "failed to symbolize: %v\n", err) os.Exit(1) } guiltyFile := reporter.ExtractGuiltyFile(text) - fmt.Printf("%v\n\n", rep.Desc) + fmt.Printf("%v\n\n", rep.Title) os.Stdout.Write(text) fmt.Printf("\n") fmt.Printf("guilty file: %v\n", guiltyFile) -- cgit mrf-deployment