aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2016-04-04 20:21:35 +0200
committerDmitry Vyukov <dvyukov@google.com>2016-04-04 20:22:10 +0200
commit7bc74c0b97f0a058bb5558ceb2b1aa080c98a2db (patch)
tree4a3783f796d1353ee429cafde5e987fbe8b3650e
parentd0df4e82844ce8de9e9fd8f9ea04a4241b5cf52a (diff)
stress: print program and output on more types of bugs
-rw-r--r--tools/syz-stress/stress.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/syz-stress/stress.go b/tools/syz-stress/stress.go
index 10a2785b3..8bd56583a 100644
--- a/tools/syz-stress/stress.go
+++ b/tools/syz-stress/stress.go
@@ -95,15 +95,15 @@ func execute(pid int, env *ipc.Env, p *prog.Prog) {
outMu.Unlock()
}
- output, _, _, _, _, err := env.Exec(p)
+ output, _, _, failed, hanged, err := env.Exec(p)
if err != nil {
fmt.Printf("failed to execute executor: %v\n", err)
}
- failed := failedRe.Match(output)
- if failed {
+ paniced := failedRe.Match(output)
+ if failed || hanged || paniced || err != nil {
fmt.Printf("PROGRAM:\n%s\n", p.Serialize())
}
- if failed || *flagOutput {
+ if failed || hanged || paniced || err != nil || *flagOutput {
os.Stdout.Write(output)
}
}