mirror of https://github.com/google/oss-fuzz.git
parent
e5c7c7099b
commit
896ed726e2
|
@ -18,7 +18,7 @@ FROM gcr.io/oss-fuzz-base/base-builder
|
|||
MAINTAINER taowen@gmail.com
|
||||
RUN go get github.com/json-iterator/go
|
||||
|
||||
RUN mkdir $GOPATH/src/fuzz
|
||||
COPY fuzz_json.go $GOPATH/src/fuzz
|
||||
RUN mkdir fuzz
|
||||
COPY fuzz_json.go fuzz
|
||||
COPY build.sh $SRC/
|
||||
WORKDIR $GOPATH/src/fuzz
|
||||
WORKDIR fuzz
|
||||
|
|
|
@ -28,4 +28,4 @@ function compile_fuzzer {
|
|||
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -lpthread -o $OUT/$fuzzer
|
||||
}
|
||||
|
||||
compile_fuzzer fuzz Fuzz fuzz_json
|
||||
compile_fuzzer . Fuzz fuzz_json
|
||||
|
|
|
@ -22,6 +22,6 @@ RUN go get -u -d github.com/google/syzkaller/...
|
|||
# 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 $GOPATH/src/syzkaller
|
||||
WORKDIR $GOPATH/src/syzkaller
|
||||
RUN git clone --depth 1 https://github.com/google/syzkaller.git
|
||||
WORKDIR syzkaller
|
||||
COPY build.sh $SRC/
|
||||
|
|
|
@ -22,16 +22,16 @@ function compile_fuzzer {
|
|||
fuzzer=$3
|
||||
|
||||
# Instrument all Go files relevant to this fuzzer
|
||||
go-fuzz-build -libfuzzer -func $function -o $fuzzer.a $path
|
||||
go-fuzz -func $function -o $fuzzer.a $path
|
||||
|
||||
# Instrumented, compiled Go ($fuzzer.a) + fuzzing engine = fuzzer binary
|
||||
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE $fuzzer.a -lpthread -o $OUT/$fuzzer
|
||||
}
|
||||
|
||||
compile_fuzzer syzkaller/pkg/compiler Fuzz compiler_fuzzer
|
||||
compile_fuzzer syzkaller/prog/test FuzzDeserialize prog_deserialize_fuzzer
|
||||
compile_fuzzer syzkaller/prog/test FuzzParseLog prog_parselog_fuzzer
|
||||
compile_fuzzer syzkaller/pkg/report Fuzz report_fuzzer
|
||||
compile_fuzzer ./pkg/compiler Fuzz compiler_fuzzer
|
||||
compile_fuzzer ./prog/test FuzzDeserialize prog_deserialize_fuzzer
|
||||
compile_fuzzer ./prog/test FuzzParseLog prog_parselog_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
|
||||
|
|
Loading…
Reference in New Issue