aboutsummaryrefslogtreecommitdiffstats
path: root/prog/any.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/any.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/any.go')
-rw-r--r--prog/any.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/any.go b/prog/any.go
index b99e64932..0a0fdddf5 100644
--- a/prog/any.go
+++ b/prog/any.go
@@ -126,7 +126,7 @@ func (target *Target) isAnyRes(name string) bool {
func (target *Target) CallContainsAny(c *Call) (res bool) {
ForeachArg(c, func(arg Arg, ctx *ArgCtx) {
- if target.isAnyPtr(arg.Type()) {
+ if target.isAnyPtr(arg.Type()) || res {
res = true
ctx.Stop = true
}
@@ -136,7 +136,7 @@ func (target *Target) CallContainsAny(c *Call) (res bool) {
func (target *Target) ArgContainsAny(arg0 Arg) (res bool) {
ForeachSubArg(arg0, func(arg Arg, ctx *ArgCtx) {
- if target.isAnyPtr(arg.Type()) {
+ if target.isAnyPtr(arg.Type()) || res {
res = true
ctx.Stop = true
}