syz-manager: don't repro non-leaks on leak instance

Leak checking is too slow to reproduce other bugs.
This commit is contained in:
Dmitry Vyukov 2019-05-20 19:15:53 +02:00
parent 32ebe81cf3
commit 7b3084af2e

View File

@ -23,6 +23,7 @@ import (
"github.com/google/syzkaller/pkg/db"
"github.com/google/syzkaller/pkg/gce"
"github.com/google/syzkaller/pkg/hash"
"github.com/google/syzkaller/pkg/host"
"github.com/google/syzkaller/pkg/instance"
"github.com/google/syzkaller/pkg/log"
"github.com/google/syzkaller/pkg/mgrconfig"
@ -673,6 +674,11 @@ func (mgr *Manager) needLocalRepro(crash *Crash) bool {
if !mgr.cfg.Reproduce || crash.Corrupted {
return false
}
if mgr.checkResult.Features[host.FeatureLeakChecking].Enabled &&
crash.Type != report.MemoryLeak {
// Leak checking is very slow, don't bother reproducing other crashes.
return false
}
sig := hash.Hash([]byte(crash.Title))
dir := filepath.Join(mgr.crashdir, sig.String())
if osutil.IsExist(filepath.Join(dir, "repro.prog")) {