diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2020-07-04 12:41:40 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-07-04 15:05:30 +0200 |
| commit | 74cb4e09a50b0f8cc45fce9ac072d1079eb03b42 (patch) | |
| tree | af9ed84de62047053e941c5e08d979fa200535b0 /tools | |
| parent | c7d7f10bdff703e4a3c0414e8a33d4e45c91eb35 (diff) | |
go.mod: add go-fuzz-build
Otherwise go-fuzz-build now fails with:
+ go-fuzz-build -libfuzzer -func FuzzDeserialize -o fuzzer.a ./prog/test
-: cannot find package "." in:
/syzkaller/gopath/src/github.com/google/syzkaller/vendor/github.com/dvyukov/go-fuzz/go-fuzz-dep
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/docker/env/Dockerfile | 5 | ||||
| -rwxr-xr-x | tools/fuzzit.sh | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/tools/docker/env/Dockerfile b/tools/docker/env/Dockerfile index 87184f84a..c1152a9a6 100644 --- a/tools/docker/env/Dockerfile +++ b/tools/docker/env/Dockerfile @@ -2,7 +2,7 @@ # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. # The image provides dev environment suitable for syzkaller development/testing. -# It includes Go toolchain, C/C++ cross-compilers and go-fuzz. +# It includes Go toolchain and C/C++ cross-compilers. # The image is available as gcr.io/syzkaller/env. @@ -36,9 +36,6 @@ RUN curl https://dl.google.com/go/go1.14.2.linux-amd64.tar.gz | tar -C /usr/loca ENV PATH /usr/local/go/bin:/gopath/bin:$PATH ENV GOPATH /gopath -# For go-fuzz we also need sources (go-fuzz-dep). -RUN go get github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build - # Pre-create dirs for syz-dock. # This is necessary to make docker work with the current user, # otherwise --volume will create these dirs under root and then diff --git a/tools/fuzzit.sh b/tools/fuzzit.sh index a056b7c3a..780ce4db5 100755 --- a/tools/fuzzit.sh +++ b/tools/fuzzit.sh @@ -7,13 +7,16 @@ set -eux export TYPE="${1}" +export GOBIN=$(realpath .)/bin function target { - go-fuzz-build -libfuzzer -func $3 -o fuzzer.a $2 + bin/go-fuzz-build -libfuzzer -func $3 -o fuzzer.a $2 clang -fsanitize=fuzzer fuzzer.a -o fuzzer ./fuzzit create job --type "${TYPE}" --branch ${GITHUB_REF#refs/heads/} --revision ${GITHUB_SHA} syzkaller/$1 ./fuzzer } +go install github.com/dvyukov/go-fuzz/go-fuzz-build + curl -L --output fuzzit https://github.com/fuzzitdev/fuzzit/releases/download/v2.4.77/fuzzit_Linux_x86_64 chmod a+x fuzzit |
