diff --git a/projects/opendal/Dockerfile b/projects/opendal/Dockerfile new file mode 100644 index 000000000..2070ea440 --- /dev/null +++ b/projects/opendal/Dockerfile @@ -0,0 +1,21 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +########################################################################## +FROM gcr.io/oss-fuzz-base/base-builder-rust + +RUN git clone --depth 1 https://github.com/apache/incubator-opendal.git opendal +WORKDIR $SRC + +COPY build.sh $SRC/ \ No newline at end of file diff --git a/projects/opendal/build.sh b/projects/opendal/build.sh new file mode 100644 index 000000000..6ed024258 --- /dev/null +++ b/projects/opendal/build.sh @@ -0,0 +1,30 @@ +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +################################################################################ + +# create env file +echo -e "OPENDAL_MEMORY_TEST=on\nOPENDAL_FS_TEST=on\nOPENDAL_FS_ROOT=/tmp" > $SRC/opendal/.env + +# build fuzz targets +cd $SRC/opendal/core +cargo +nightly fuzz build -O --debug-assertions + +# copy fuzz targets to $OUT +targets=( + fuzz_reader + fuzz_writer +) +for target in "${targets[@]}"; do + cp ../target/x86_64-unknown-linux-gnu/release/$target $OUT/ +done diff --git a/projects/opendal/project.yaml b/projects/opendal/project.yaml new file mode 100644 index 000000000..d124bfb96 --- /dev/null +++ b/projects/opendal/project.yaml @@ -0,0 +1,13 @@ +homepage: "https://opendal.apache.org/" +main_repo: "https://github.com/apache/incubator-opendal.git" +language: rust +primary_contact: "xuanwo.cn@gmail.com" +auto_ccs: + - "dqhl76@gmail.com" +vendor_ccs: + - "commits@opendal.apache.org" +sanitizers: + - address +fuzzing_engines: + - libfuzzer +file_github_issue: True \ No newline at end of file