From 7f07e9b0e2d1b715e875a446eea8399f9bb8a4b2 Mon Sep 17 00:00:00 2001 From: Aleksandr Nogikh Date: Thu, 1 Feb 2024 18:26:06 +0100 Subject: 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. --- prog/analysis.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'prog/analysis.go') 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 +} -- cgit mrf-deployment