2020-10-17 00:10:49 +08:00
|
|
|
#!/bin/bash -eu
|
|
|
|
|
|
|
|
#
|
|
|
|
# This script runs the continuous fuzzing tests on OSS-Fuzz.
|
|
|
|
#
|
|
|
|
|
2020-10-16 22:33:18 +08:00
|
|
|
if [[ ${SANITIZER} = *undefined* ]]; then
|
|
|
|
CXXFLAGS="${CXXFLAGS} -fsanitize=unsigned-integer-overflow -fsanitize-trap=unsigned-integer-overflow"
|
2020-10-17 00:10:49 +08:00
|
|
|
fi
|
|
|
|
|
2020-10-16 22:33:18 +08:00
|
|
|
for test in libcxx/test/libcxx/fuzzing/*.pass.cpp; do
|
2020-11-06 23:06:44 +08:00
|
|
|
exe="$(basename ${test})"
|
|
|
|
exe="${exe%.pass.cpp}"
|
2020-10-16 22:33:18 +08:00
|
|
|
${CXX} ${CXXFLAGS} \
|
|
|
|
-std=c++14 \
|
|
|
|
-DLIBCPP_OSS_FUZZ \
|
|
|
|
-nostdinc++ -cxx-isystem libcxx/include \
|
2020-11-06 23:06:44 +08:00
|
|
|
-o "${OUT}/${exe}" \
|
2020-10-16 22:33:18 +08:00
|
|
|
${test} \
|
|
|
|
${LIB_FUZZING_ENGINE}
|
2020-10-17 00:10:49 +08:00
|
|
|
done
|