aboutsummaryrefslogtreecommitdiffstats
path: root/prog/analysis.go
diff options
context:
space:
mode:
authorAleksandr Nogikh <nogikh@google.com>2024-02-01 18:26:06 +0100
committerAleksandr Nogikh <nogikh@google.com>2024-02-08 13:36:40 +0000
commit7f07e9b0e2d1b715e875a446eea8399f9bb8a4b2 (patch)
treeec243ce4296c5360c876389298a35dcaa8a1f662 /prog/analysis.go
parente8e3023880fc4f8be85c1d1c689fd1fc9a77d60e (diff)
syz-manager: prefer non-ANY progs in corpus minimization
In case of non-squashed programs we can leverage our descriptions in a much better way than just blind mutations of binary blobs.
Diffstat (limited to 'prog/analysis.go')
-rw-r--r--prog/analysis.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/prog/analysis.go b/prog/analysis.go
index 47c470926..600f9bee4 100644
--- a/prog/analysis.go
+++ b/prog/analysis.go
@@ -367,3 +367,12 @@ func (p *Prog) ForEachAsset(cb func(name string, typ AssetType, r io.Reader)) {
})
}
}
+
+func (p *Prog) ContainsAny() bool {
+ for _, c := range p.Calls {
+ if p.Target.CallContainsAny(c) {
+ return true
+ }
+ }
+ return false
+}