Skip to content

Commit

Permalink
[SBFT'23] 10 more bug-based benchmarks for final evaluation (google#1776
Browse files Browse the repository at this point in the history
)
  • Loading branch information
DonggeLiu authored Mar 5, 2023
1 parent 7f8dad3 commit 9b0e878
Show file tree
Hide file tree
Showing 113 changed files with 1,700 additions and 0 deletions.
35 changes: 35 additions & 0 deletions benchmarks/arrow_arrow-ipc-stream-fuzz_1a34a0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Copyright 2020 Google Inc.
#
# 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@sha256:87ca1e9e19235e731fac8de8d1892ebe8d55caf18e7aa131346fc582a2034fdd

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y -q --no-install-recommends \
bison \
build-essential \
cmake \
flex \
libboost-all-dev \
ninja-build \
python3

RUN git clone \
--recurse-submodules \
https://github.com/apache/arrow.git \
$SRC/arrow

COPY build.sh thrift.patch $SRC/
57 changes: 57 additions & 0 deletions benchmarks/arrow_arrow-ipc-stream-fuzz_1a34a0/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# 4846902008479744
commit: 1A34A078B29C3F119C93DE10631D26FC0D52739A
commit_date: 2022-08-19T03:19:28+0000
fuzz_target: arrow-ipc-stream-fuzz
project: arrow
type: bug
unsupported_fuzzers:
- honggfuzz # To Be Fixed.
- aflcc
- afl_qemu
- aflplusplus_qemu
- aflplusplus_qemu_tracepc
- aflplusplus_frida
- honggfuzz_qemu
- klee
- weizz_qemu
- lafintel
- neuzz
- aflplusplus_qemu_tracepc
- aflplusplus_qemu_cmplog
- aflplusplus_qemu_cmplog_inmem
- aflplusplus_qemu_inmem
- aflplusplus_classic_ctx
- aflplusplus_classic_ctx_18
- aflplusplus_classic_ctx_20
- aflplusplus_classic_ctx_21
- aflplusplus_classic_ctx_23
- aflplusplus_pcguard
- cfctx_basic
- cfctx_bottom
- cfctx_dataflow_seadsa
- cfctx_dataflow_svf
- cfctx_params
- cfctx_plain
- cfctx_randomic
- cfctx_bottom_llc
- cfctx_dataflow_seadsa_llc
- cfctx_dataflow_svf_llc
- cfctx_randomic_llc
- cfctx_params_llc
- cfctx_params_1mb
- cfctx_params_2mb
- cfctx_params_4mb
- cfctx_params_512kb
- cfctx_params_768kb
- cfctx_full
- aflplusplus_cmplog_double
- symcc_aflplusplus_single
- eclipser_aflplusplus
- aflplusplus_qemu_double
- fuzzolic_aflplusplus_z3
- symqemu_aflplusplus
- fuzzolic_aflplusplus_fuzzy
- fuzzolic_aflplusplus_z3dict
- aflplusplus_gcc
- aflplusplus_classic
- tortoisefuzz
72 changes: 72 additions & 0 deletions benchmarks/arrow_arrow-ipc-stream-fuzz_1a34a0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash -eu
# Copyright 2020 Google Inc.
#
# 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.
#
################################################################################

set -ex

# Fix thrift download.
# This needs to be done in build.sh because the checkout happens after the
# builder.Dockerfile completes.
cd $SRC/arrow
git apply ../thrift.patch || true
cd -
ARROW=${SRC}/arrow/cpp

cd ${WORK}

# The CMake build setup compiles and runs the Thrift compiler, but ASAN
# would report leaks and error out.
export ASAN_OPTIONS="detect_leaks=0"

cmake ${ARROW} -GNinja \
-DCMAKE_BUILD_TYPE=Release \
-DARROW_DEPENDENCY_SOURCE=BUNDLED \
-DBOOST_SOURCE=SYSTEM \
-DCMAKE_C_FLAGS="${CFLAGS}" \
-DCMAKE_CXX_FLAGS="${CXXFLAGS}" \
-DARROW_EXTRA_ERROR_CONTEXT=off \
-DARROW_JEMALLOC=off \
-DARROW_MIMALLOC=off \
-DARROW_FILESYSTEM=off \
-DARROW_PARQUET=on \
-DARROW_BUILD_SHARED=off \
-DARROW_BUILD_STATIC=on \
-DARROW_BUILD_TESTS=off \
-DARROW_BUILD_INTEGRATION=off \
-DARROW_BUILD_BENCHMARKS=off \
-DARROW_BUILD_EXAMPLES=off \
-DARROW_BUILD_UTILITIES=off \
-DARROW_TEST_LINKAGE=static \
-DPARQUET_BUILD_EXAMPLES=off \
-DPARQUET_BUILD_EXECUTABLES=off \
-DPARQUET_REQUIRE_ENCRYPTION=off \
-DARROW_WITH_BROTLI=on \
-DARROW_WITH_BZ2=off \
-DARROW_WITH_LZ4=off \
-DARROW_WITH_SNAPPY=off \
-DARROW_WITH_ZLIB=off \
-DARROW_WITH_ZSTD=off \
-DARROW_USE_GLOG=off \
-DARROW_USE_ASAN=off \
-DARROW_USE_UBSAN=off \
-DARROW_USE_TSAN=off \
-DARROW_FUZZING=on \

cmake --build .

cp -a release/* ${OUT}

${ARROW}/build-support/fuzzing/generate_corpuses.sh ${OUT}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
����PAR1
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
22 changes: 22 additions & 0 deletions benchmarks/arrow_arrow-ipc-stream-fuzz_1a34a0/thrift.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/cpp/cmake_modules/ThirdpartyToolchain.cmake b/cpp/cmake_modules/ThirdpartyToolchain.cmake
index 9c062f86a..5d04ef92c 100644
--- a/cpp/cmake_modules/ThirdpartyToolchain.cmake
+++ b/cpp/cmake_modules/ThirdpartyToolchain.cmake
@@ -39,7 +39,7 @@ endif()
# ----------------------------------------------------------------------
# We should not use the Apache dist server for build dependencies

-set(APACHE_MIRROR "")
+set(APACHE_MIRROR "https://archive.apache.org")

macro(get_apache_mirror)
if(APACHE_MIRROR STREQUAL "")
@@ -1129,7 +1129,7 @@ macro(build_thrift)
get_apache_mirror()
set(
THRIFT_SOURCE_URL
- "${APACHE_MIRROR}/thrift/${ARROW_THRIFT_BUILD_VERSION}/thrift-${ARROW_THRIFT_BUILD_VERSION}.tar.gz"
+ "${APACHE_MIRROR}/dist/thrift/${ARROW_THRIFT_BUILD_VERSION}/thrift-${ARROW_THRIFT_BUILD_VERSION}.tar.gz"
)
endif()

31 changes: 31 additions & 0 deletions benchmarks/aspell_aspell_fuzzer_e8eb74/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2019 Google Inc.
#
# 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@sha256:87ca1e9e19235e731fac8de8d1892ebe8d55caf18e7aa131346fc582a2034fdd

RUN git clone \
https://github.com/gnuaspell/aspell.git \
$SRC/aspell

RUN git clone \
https://github.com/gnuaspell/aspell-fuzz.git \
$SRC/aspell-fuzz && \
git -C $SRC/aspell-fuzz checkout fa4aa32c6bf9573801a7675137e1c31b9f13247f


WORKDIR $SRC/aspell-fuzz
COPY build.sh $SRC/

50 changes: 50 additions & 0 deletions benchmarks/aspell_aspell_fuzzer_e8eb74/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 4546146634170368
commit: e8eb74793bce4fab381cc40f1c60f9572a99fb94
commit_date : 2022-06-01T23:38:41+0000
fuzz_target: aspell_fuzzer
project: aspell
type: bug
unsupported_fuzzers:
- aflcc
- afl_qemu
- aflplusplus_qemu
- aflplusplus_qemu_tracepc
- aflplusplus_frida
- honggfuzz_qemu
- klee
- lafintel
- weizz_qemu
- aflplusplus_classic_ctx
- aflplusplus_classic_ctx_18
- aflplusplus_classic_ctx_20
- aflplusplus_classic_ctx_21
- aflplusplus_classic_ctx_23
- aflplusplus_pcguard
- aflplusplus_classic
- cfctx_basic
- cfctx_bottom
- cfctx_dataflow_seadsa
- cfctx_dataflow_svf
- cfctx_params
- cfctx_plain
- cfctx_randomic
- cfctx_bottom_llc
- cfctx_dataflow_seadsa_llc
- cfctx_dataflow_svf_llc
- cfctx_randomic_llc
- cfctx_params_llc
- cfctx_params_1mb
- cfctx_params_2mb
- cfctx_params_4mb
- cfctx_params_512kb
- cfctx_params_768kb
- cfctx_full
- aflplusplus_cmplog_double
- symcc_aflplusplus_single
- eclipser_aflplusplus
- aflplusplus_qemu_double
- fuzzolic_aflplusplus_z3
- symqemu_aflplusplus
- fuzzolic_aflplusplus_fuzzy
- fuzzolic_aflplusplus_z3dict
- tortoisefuzz
21 changes: 21 additions & 0 deletions benchmarks/aspell_aspell_fuzzer_e8eb74/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/bash -eu
# Copyright 2019 Google Inc.
#
# 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.
#
################################################################################

# Run the OSS-Fuzz script in the fuzzer project.
pushd $SRC/aspell-fuzz
./ossfuzz.sh
popd
23 changes: 23 additions & 0 deletions benchmarks/assimp_assimp_fuzzer_4d451f/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright 2021 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@sha256:87ca1e9e19235e731fac8de8d1892ebe8d55caf18e7aa131346fc582a2034fdd

RUN apt-get update && apt-get install -y cmake ninja-build
RUN git clone --recursive https://github.com/assimp/assimp.git
WORKDIR assimp
COPY build.sh $SRC/

5 changes: 5 additions & 0 deletions benchmarks/assimp_assimp_fuzzer_4d451f/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# 4515118433566720
commit: 4D451FE437195025CB933C69670AACF4F92968B3
fuzz_target: assimp_fuzzer
project: assimp
type: bug
27 changes: 27 additions & 0 deletions benchmarks/assimp_assimp_fuzzer_4d451f/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash -eu
# Copyright 2021 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.
#
################################################################################

# generate build env and build assimp
cmake CMakeLists.txt -G "Ninja" -DBUILD_SHARED_LIBS=OFF -DASSIMP_BUILD_ZLIB=ON \
-DASSIMP_BUILD_TESTS=OFF -DASSIMP_BUILD_ASSIMP_TOOLS=OFF \
-DASSIMP_BUILD_SAMPLES=OFF
cmake --build .

# Build the fuzzer
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE -std=c++11 -I$SRC/assimp/include \
fuzz/assimp_fuzzer.cc -o $OUT/assimp_fuzzer \
./lib/libassimp.a ./contrib/zlib/libzlibstatic.a
Loading

0 comments on commit 9b0e878

Please sign in to comment.