aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-01-19 12:33:54 +0100
committerDmitry Vyukov <dvyukov@google.com>2017-01-20 14:56:20 +0100
commitc4f622fcb3a3d46a3802ec144eb60548629ef14e (patch)
treea15c132a4472cfd4039616e000b0219edb341c47
parentaffae90ec407a54751b799027e31a672d3914039 (diff)
syz-manager: add option to turn off crash reproducing
Reproducing is still turned on by default, turning it off can be useful for benchmarking.
-rw-r--r--config/config.go7
-rw-r--r--syz-manager/manager.go3
2 files changed, 8 insertions, 2 deletions
diff --git a/config/config.go b/config/config.go
index 5d651dff4..4f53ba195 100644
--- a/config/config.go
+++ b/config/config.go
@@ -53,8 +53,9 @@ type Config struct {
Machine_Type string // GCE machine type (e.g. "n1-highcpu-2")
- Cover bool // use kcov coverage (default: true)
- Leak bool // do memory leak checking
+ Cover bool // use kcov coverage (default: true)
+ Leak bool // do memory leak checking
+ Reproduce bool // reproduce, localize and minimize crashers (on by default)
Enable_Syscalls []string
Disable_Syscalls []string
@@ -87,6 +88,7 @@ func parse(data []byte) (*Config, map[int]bool, error) {
}
cfg := new(Config)
cfg.Cover = true
+ cfg.Reproduce = true
cfg.Sandbox = "setuid"
if err := json.Unmarshal(data, cfg); err != nil {
return nil, nil, fmt.Errorf("failed to parse config file: %v", err)
@@ -317,6 +319,7 @@ func checkUnknownFields(data []byte) (string, error) {
"Devices",
"Procs",
"Cover",
+ "Reproduce",
"Sandbox",
"Leak",
"Enable_Syscalls",
diff --git a/syz-manager/manager.go b/syz-manager/manager.go
index 93f0e87d0..ef079375f 100644
--- a/syz-manager/manager.go
+++ b/syz-manager/manager.go
@@ -462,6 +462,9 @@ func (mgr *Manager) saveCrash(crash *Crash) {
const maxReproAttempts = 3
func (mgr *Manager) needRepro(desc string) bool {
+ if !mgr.cfg.Reproduce {
+ return false
+ }
sig := hash.Hash([]byte(desc))
dir := filepath.Join(mgr.crashdir, sig.String())
if _, err := os.Stat(filepath.Join(dir, "repro.prog")); err == nil {