mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-30 06:40:50 +00:00
syz-manager: add option to turn off crash reproducing
Reproducing is still turned on by default, turning it off can be useful for benchmarking.
This commit is contained in:
parent
affae90ec4
commit
c4f622fcb3
@ -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",
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user