diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2019-05-21 12:25:10 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-21 12:25:10 +0200 |
| commit | 4adc00e894b5b48191bc248286bee600e712f99f (patch) | |
| tree | 4e9967ec4514e9107013faf35b204f0be61a0f58 | |
| parent | f35ffcc16f1a5596137035584d2328ff290d63ca (diff) | |
syz-manager: reproduce leaks from hub
pkg/repro only enables leak checking when report type is MemoryLeak.
Since repros from hub always have Unknown type, repro won't reproduce leaks.
Always set report type to MemoryLeak on leak instances.
| -rw-r--r-- | syz-manager/hub.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/syz-manager/hub.go b/syz-manager/hub.go index bb818f7f8..5f85c8fe2 100644 --- a/syz-manager/hub.go +++ b/syz-manager/hub.go @@ -7,6 +7,7 @@ import ( "time" "github.com/google/syzkaller/pkg/hash" + "github.com/google/syzkaller/pkg/host" "github.com/google/syzkaller/pkg/log" "github.com/google/syzkaller/pkg/mgrconfig" "github.com/google/syzkaller/pkg/report" @@ -21,6 +22,7 @@ func (mgr *Manager) hubSyncLoop() { target: mgr.target, stats: mgr.stats, enabledCalls: mgr.checkResult.EnabledCalls[mgr.cfg.Sandbox], + leak: mgr.checkResult.Features[host.FeatureLeakChecking].Enabled, fresh: mgr.fresh, hubReproQueue: mgr.hubReproQueue, } @@ -36,6 +38,7 @@ type HubConnector struct { target *prog.Target stats *Stats enabledCalls []int + leak bool fresh bool hubCorpus map[hash.Sig]bool newRepros [][]byte @@ -179,11 +182,19 @@ func (hc *HubConnector) processRepros(repros [][]byte) int { dropped++ continue } + // On a leak instance we override repro type to leak, + // because otherwise repro package won't even enable leak detection + // and we won't reproduce leaks from other instances. + typ := report.Unknown + if hc.leak { + typ = report.MemoryLeak + } hc.hubReproQueue <- &Crash{ vmIndex: -1, hub: true, Report: &report.Report{ Title: "external repro", + Type: typ, Output: repro, }, } |
