[rapidjson] Extended fuzzer (#2765)

* [rapidjson] Extended fuzzer

* [rapidjson] Extended fuzzer: Add Dockerfile and compile with -std=c++2a
This commit is contained in:
Guido Vranken 2019-08-27 18:40:44 +02:00 committed by Max Moroz
parent a8c21cd243
commit 4159623ecd
2 changed files with 9 additions and 0 deletions

View File

@ -19,5 +19,6 @@ MAINTAINER guidovranken@gmail.com
RUN apt-get update && apt-get install -y make autoconf automake libtool cmake
RUN git clone --depth 1 https://github.com/Tencent/rapidjson.git rapidjson
RUN git clone --depth 1 https://github.com/guidovranken/rapidjson-fuzzers.git rapidjson-fuzzers
RUN git clone --depth 1 https://github.com/guidovranken/fuzzing-headers.git
WORKDIR rapidjson-fuzzers
COPY build.sh $SRC/

View File

@ -20,5 +20,13 @@ then
export CXXFLAGS="$CXXFLAGS -DMSAN"
fi
if [[ $CFLAGS = *sanitize=address* ]]
then
export CXXFLAGS="$CXXFLAGS -DASAN"
fi
$CXX $CXXFLAGS -D_GLIBCXX_DEBUG -I $SRC/rapidjson/include fuzzer.cpp $LIB_FUZZING_ENGINE -o $OUT/fuzzer
cp fuzzer_seed_corpus.zip $OUT
cd $SRC/fuzzing-headers/tests
$CXX $CXXFLAGS -std=c++2a -D_GLIBCXX_DEBUG -I $SRC/rapidjson/include -I ../include rapidjson.cpp $LIB_FUZZING_ENGINE -o $OUT/fuzzer-extended