Skip to content

Commit

Permalink
[syzkaller] Make report_fuzzer build successfully and move deps to th…
Browse files Browse the repository at this point in the history
…e Dockerfile. (google#2721)
  • Loading branch information
Dor1s authored Aug 19, 2019
1 parent 2cb6fe0 commit 0fa9270
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
9 changes: 9 additions & 0 deletions projects/syzkaller/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
10 changes: 1 addition & 9 deletions projects/syzkaller/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 0fa9270

Please sign in to comment.