From 0fa92706eff03683fad2c59231a19fee280e1529 Mon Sep 17 00:00:00 2001 From: Max Moroz Date: Mon, 19 Aug 2019 07:04:20 -0700 Subject: [PATCH] [syzkaller] Make report_fuzzer build successfully and move deps to the Dockerfile. (#2721) --- projects/syzkaller/Dockerfile | 9 +++++++++ projects/syzkaller/build.sh | 10 +--------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/projects/syzkaller/Dockerfile b/projects/syzkaller/Dockerfile index 86a75533b..fb1e8e473 100644 --- a/projects/syzkaller/Dockerfile +++ b/projects/syzkaller/Dockerfile @@ -23,6 +23,15 @@ ENV PATH $SRC/go/bin:$GOPATH/bin:$PATH RUN go get -u -d github.com/google/syzkaller/... +# Dependency of go-fuzz +RUN go get golang.org/x/tools/go/packages + +# go-fuzz-build is the tool that instruments Go files. +RUN go get github.com/dvyukov/go-fuzz/go-fuzz-build + +# Dependency for one of the fuzz targets. +RUN go get github.com/ianlancetaylor/demangle + RUN git clone --depth 1 https://github.com/google/syzkaller.git syzkaller WORKDIR syzkaller COPY build.sh $SRC/ diff --git a/projects/syzkaller/build.sh b/projects/syzkaller/build.sh index d1f78311d..44be203f7 100755 --- a/projects/syzkaller/build.sh +++ b/projects/syzkaller/build.sh @@ -15,12 +15,6 @@ # ################################################################################ -# Dependency of go-fuzz -go get golang.org/x/tools/go/packages - -# go-fuzz-build is the tool that instruments Go files. -go get github.com/dvyukov/go-fuzz/go-fuzz-build - # Based on the function from oss-fuzz/projects/golang/build.sh script. function compile_fuzzer { path=$1 @@ -37,9 +31,7 @@ function compile_fuzzer { compile_fuzzer ./pkg/compiler Fuzz compiler_fuzzer compile_fuzzer ./prog/test FuzzDeserialize prog_deserialize_fuzzer compile_fuzzer ./prog/test FuzzParseLog prog_parselog_fuzzer - -# This target fails to build. -# compile_fuzzer ./pkg/report Fuzz report_fuzzer +compile_fuzzer ./pkg/report Fuzz report_fuzzer # This target is way too spammy and OOMs very quickly. # compile_fuzzer ./tools/syz-trace2syz/proggen Fuzz trace2syz_fuzzer