aboutsummaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2017-09-14 09:49:26 +0200
committerDmitry Vyukov <dvyukov@google.com>2017-09-15 16:02:37 +0200
commitc0cabacda7db153dcdb0940972a680296a9e56f3 (patch)
treef8d7182f5862bed821e8b6c3ea00fbf96b79276e /tools
parentc6d248ce95cf3e74ba38ca431ea4b018f75e1881 (diff)
syz-fuzzer, syz-execprog: add -arch flag
arch flag specifies target arch, which can be different from GOARCH. For example, 386 executor with amd64 fuzzer.
Diffstat (limited to 'tools')
-rw-r--r--tools/syz-execprog/execprog.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/syz-execprog/execprog.go b/tools/syz-execprog/execprog.go
index 37360c7f0..53fcbb8ca 100644
--- a/tools/syz-execprog/execprog.go
+++ b/tools/syz-execprog/execprog.go
@@ -28,6 +28,7 @@ import (
)
var (
+ flagArch = flag.String("arch", runtime.GOARCH, "target arch")
flagExecutor = flag.String("executor", "./syz-executor", "path to executor binary")
flagCoverFile = flag.String("coverfile", "", "write coverage to the file")
flagRepeat = flag.Int("repeat", 1, "repeat execution that many times (0 for infinite loop)")
@@ -46,7 +47,7 @@ func main() {
os.Exit(1)
}
- if err := prog.SetDefaultTarget(runtime.GOOS, runtime.GOARCH); err != nil {
+ if err := prog.SetDefaultTarget(runtime.GOOS, *flagArch); err != nil {
Fatalf("%v", err)
}