diff --git a/projects/tidb/Dockerfile b/projects/tidb/Dockerfile index 86995d697..b06a2b5e8 100644 --- a/projects/tidb/Dockerfile +++ b/projects/tidb/Dockerfile @@ -15,6 +15,6 @@ ################################################################################ FROM gcr.io/oss-fuzz-base/base-builder -RUN go get github.com/pingcap/tidb/store +RUN git clone --depth 1 https://github.com/pingcap/tidb COPY build.sh $SRC/ WORKDIR $SRC/ diff --git a/projects/tidb/build.sh b/projects/tidb/build.sh index 9135a32d5..3f9717570 100755 --- a/projects/tidb/build.sh +++ b/projects/tidb/build.sh @@ -15,6 +15,13 @@ # ################################################################################ +# Insert empty main function +sed -i '23 i\func main(){}'\\n $SRC/tidb/plugin/conn_ip_example/conn_ip_example.go + +mkdir $GOPATH/src/github.com/pingcap +mv $SRC/tidb $GOPATH/src/github.com/pingcap/ +cd $GOPATH/src/github.com/pingcap/tidb && go get ./... + compile_go_fuzzer github.com/pingcap/tidb/types FuzzMarshalJSON fuzzMarshalJSON compile_go_fuzzer github.com/pingcap/tidb/types FuzzNewBitLiteral fuzzNewBitLiteral compile_go_fuzzer github.com/pingcap/tidb/types FuzzNewHexLiteral fuzzNewHexLiteral