aboutsummaryrefslogtreecommitdiffstats
path: root/pkg
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-07-06 11:16:21 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-07-06 12:17:39 +0200
commit76f45d87f2da4a2f6f7066797523d9457f71ad12 (patch)
tree87814eda96de07824dabea84c3bd64549850db05 /pkg
parentf68d78b5a85be1b59350032055f60321fbbfc116 (diff)
syz-manager: save proper report for reproducers
We can start reproducing one crash, but end up reproducing another. Currently we still attribute the resulting repro to the original crash. This is wrong. Save the resulting desc/report for reproducers and use that in manager.
Diffstat (limited to 'pkg')
-rw-r--r--pkg/repro/repro.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/pkg/repro/repro.go b/pkg/repro/repro.go
index b5e265301..bce549b0a 100644
--- a/pkg/repro/repro.go
+++ b/pkg/repro/repro.go
@@ -36,7 +36,10 @@ type Result struct {
Opts csource.Options
CRepro bool
Stats Stats
- Report []byte
+ // Description and report of the final crash that we reproduced.
+ // Can be different from what we started reproducing.
+ Desc string
+ Report []byte
}
type context struct {
@@ -45,6 +48,7 @@ type context struct {
instances chan *instance
bootRequests chan int
stats Stats
+ desc string
report []byte
}
@@ -137,6 +141,7 @@ func Run(crashLog []byte, cfg *mgrconfig.Config, vmPool *vm.Pool, vmIndexes []in
if res != nil {
ctx.reproLog(3, "repro crashed as:\n%s", string(ctx.report))
res.Stats = ctx.stats
+ res.Desc = ctx.desc
res.Report = ctx.report
}
@@ -666,6 +671,7 @@ func (ctx *context) testImpl(inst *vm.Instance, command string, duration time.Du
ctx.reproLog(2, "program did not crash")
return false, nil
}
+ ctx.desc = desc
ctx.report = report
ctx.reproLog(2, "program crashed: %v", desc)
return true, nil