diff options
Diffstat (limited to 'syz-cluster/workflow/fuzz-step/main.go')
| -rw-r--r-- | syz-cluster/workflow/fuzz-step/main.go | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/syz-cluster/workflow/fuzz-step/main.go b/syz-cluster/workflow/fuzz-step/main.go index fa690dc93..72b50c943 100644 --- a/syz-cluster/workflow/fuzz-step/main.go +++ b/syz-cluster/workflow/fuzz-step/main.go @@ -14,6 +14,7 @@ import ( "net/http" "os" "path/filepath" + "regexp" "time" "github.com/google/syzkaller/pkg/build" @@ -183,7 +184,11 @@ func run(baseCtx context.Context, config *api.FuzzConfig, client *api.Client, Store: store, MaxTriageTime: timeout / 2, FuzzToReachPatched: fuzzToReachPatched(config), - BaseCrashKnown: func(ctx context.Context, title string) (bool, error) { + IgnoreCrash: func(ctx context.Context, title string) (bool, error) { + if !titleMatchesFilter(config, title) { + log.Logf(1, "crash %q doesn't match the filter", title) + return true, nil + } ret, err := client.BaseFindingStatus(ctx, &api.BaseFindingInfo{ BuildID: *flagBaseBuild, Title: title, @@ -191,6 +196,9 @@ func run(baseCtx context.Context, config *api.FuzzConfig, client *api.Client, if err != nil { return false, err } + if ret.Observed { + log.Logf(1, "crash %q is already known", title) + } return ret.Observed, nil }, }) @@ -382,6 +390,14 @@ func shouldSkipFuzzing(base, patched build.SectionHashes) bool { return false } +func titleMatchesFilter(config *api.FuzzConfig, title string) bool { + matched, err := regexp.MatchString(config.BugTitleRe, title) + if err != nil { + app.Fatalf("invalid BugTitleRe regexp: %v", err) + } + return matched +} + func readSymbolHashes() (base, patched build.SectionHashes, err error) { // These are saved by the build step. base, err = readSectionHashes("/base/symbol_hashes.json") |
