Onboarding new ZetaSQL fuzzers (#4095)

* Enable UBSAN

* Added a structure aware fuzzer

* Revert "Enable UBSAN" and explicitly enable it in
project.yaml

This reverts commit de66864567.

* Amend UBSAN commit

* Disable MSan

Co-authored-by: Abhishek Arya <inferno@chromium.org>
This commit is contained in:
Zhengdai Hu 2020-07-14 19:56:51 +00:00 committed by GitHub
parent c2ad696b86
commit 22dfa6882e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 6 deletions

View File

@ -25,6 +25,7 @@ RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add - && \
RUN apt-get update && apt-get -y install bazel-1.0.0
RUN git clone --depth 1 https://github.com/googleinterns/zetasql-fuzzing.git zetasql
RUN git clone -b arithmetic_fuzzer --depth 1 \
https://github.com/googleinterns/zetasql-fuzzing.git zetasql
COPY build.sh $SRC/
WORKDIR zetasql

View File

@ -49,10 +49,10 @@ fi
)"
# Temporary hack, see https://github.com/google/oss-fuzz/issues/383
readonly NO_VPTR='--copt=-fno-sanitize=vptr --linkopt=-fno-sanitize=vptr'
readonly NO_VPTR='--copt=-fno-sanitize=vptr --linkopt=-fno-sanitize=vptr --cxxopt=-fno-sanitize=vptr'
declare FUZZER_PATH="zetasql/fuzzing/simple_evaluator_fuzzer"
declare FUZZ_TARGET="//zetasql/fuzzing:simple_evaluator_fuzzer"
declare FUZZER_PATH=$(for path in $(find zetasql/fuzzing -name *_fuzzer.cc); do echo "${path%.*}"; done)
declare FUZZ_TARGET="$(for fuzzer in ${FUZZER_PATH}; do echo "//$(dirname ${fuzzer}):$(basename ${fuzzer})"; done)"
# Build fuzz target
# see https://google.github.io/oss-fuzz/further-reading/fuzzer-environment/
@ -109,7 +109,10 @@ cp -r /usr/share/zoneinfo $OUT/data/
ln -sf Etc/UTC $OUT/data/zoneinfo/localtime
# Move out fuzz target
cp bazel-bin/"${FUZZER_PATH}" "${OUT}"/
for fuzzer in ${FUZZER_PATH};
do
cp bazel-bin/"${fuzzer}" "${OUT}"/
done
# Cleanup bazel- symlinks to avoid oss-fuzz trying to copy out of the build
# cache.

View File

@ -6,4 +6,4 @@ auto_ccs:
- "shumway@google.com"
sanitizers:
- address
- memory
- undefined