aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-04-17 17:52:36 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-04-17 17:53:08 +0200
commit435c6d538899a51dde5bbc2472cd4e7ecb2ef270 (patch)
treedad471dca93545cf526acbb3fe5aaeeb0f126350
parent18397578713eeefc1cf3a687cca53594c1cfd49f (diff)
pkg/host: support wrapping of executor binary
pkg/ipc has this logic for executor binary as well. Allows to run e.g. executor under strace as: syz-execprog -executor "/bin/strace -o /tmp/log /bin/syz-executor" prog
-rw-r--r--pkg/host/features.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/host/features.go b/pkg/host/features.go
index 707757755..dac743fb5 100644
--- a/pkg/host/features.go
+++ b/pkg/host/features.go
@@ -4,6 +4,7 @@
package host
import (
+ "strings"
"time"
"github.com/google/syzkaller/pkg/csource"
@@ -88,7 +89,9 @@ func Setup(target *prog.Target, features *Features, featureFlags csource.Feature
if targets.Get(target.OS, target.Arch).HostFuzzer {
return nil
}
- args := []string{"setup"}
+ args := strings.Split(executor, " ")
+ executor = args[0]
+ args = append(args[1:], "setup")
if features[FeatureLeak].Enabled {
args = append(args, "leak")
}