aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-08-31 13:20:57 +0200
committerDmitry Vyukov <dvyukov@google.com>2016-08-31 13:20:57 +0200
commitbb1e3bfda5157bb381c20dd7f39b56ea565498e9 (patch)
tree0516fdd0cac87f0dbe248c3b4a87a408d756605b /tools
parent14dfa4f109c48eccec25e4299f3357c09d7399a7 (diff)
report: extract better, unique identifiers of oopses
Diffstat (limited to 'tools')
-rw-r--r--tools/syz-repro/repro.go20
1 files changed, 17 insertions, 3 deletions
diff --git a/tools/syz-repro/repro.go b/tools/syz-repro/repro.go
index 270533631..8c5cf09c2 100644
--- a/tools/syz-repro/repro.go
+++ b/tools/syz-repro/repro.go
@@ -65,8 +65,8 @@ func main() {
entries := prog.ParseLog(data)
log.Printf("parsed %v programs", len(entries))
- crashDesc, crashStart, _, found := report.FindCrash(data)
- if !found {
+ crashDesc, _, crashStart, _ := report.Parse(data)
+ if crashDesc == "" {
log.Fatalf("can't find crash message in the log")
}
log.Printf("target crash: '%s'", crashDesc)
@@ -276,7 +276,21 @@ func testImpl(inst vm.Instance, command string, timeout time.Duration) (res bool
select {
case out := <-outc:
output = append(output, out...)
- if desc, _, _, found := report.FindCrash(output); found {
+ if report.ContainsCrash(output) {
+ timer := time.NewTimer(5 * time.Second).C
+ loop:
+ for {
+ select {
+ case out, ok := <-outc:
+ if !ok {
+ break loop
+ }
+ output = append(output, out...)
+ case <-timer:
+ break loop
+ }
+ }
+ desc, _, _, _ := report.Parse(output)
log.Printf("program crashed with '%s'", desc)
return true
}