From c0cabacda7db153dcdb0940972a680296a9e56f3 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 14 Sep 2017 09:49:26 +0200 Subject: 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. --- tools/syz-execprog/execprog.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools') 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) } -- cgit mrf-deployment