aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Guido Vranken <guidovranken@users.noreply.github.com>2019-06-14 17:30:54 +0200
committerGravatar Abhishek Arya <inferno@chromium.org>2019-06-14 08:30:54 -0700
commit4c6ce593dc50ae175bdf8fdd2bb936b48a003f0c (patch)
tree21c374737cb0c5bd66b183384c1a57d2f653b314
parent9e3ec89cf2961cb0f8fd189e9c19b7b23538961f (diff)
[rapidjson] Add rapidjson (#2343)
* [rapidjson] Add rapidjson * [rapidjson] Fix Dockerfile MAINTAINER field
-rw-r--r--projects/rapidjson/Dockerfile23
-rwxr-xr-xprojects/rapidjson/build.sh24
-rw-r--r--projects/rapidjson/project.yaml6
3 files changed, 53 insertions, 0 deletions
diff --git a/projects/rapidjson/Dockerfile b/projects/rapidjson/Dockerfile
new file mode 100644
index 00000000..a550f4a8
--- /dev/null
+++ b/projects/rapidjson/Dockerfile
@@ -0,0 +1,23 @@
+# 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
+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
+WORKDIR rapidjson-fuzzers
+COPY build.sh $SRC/
diff --git a/projects/rapidjson/build.sh b/projects/rapidjson/build.sh
new file mode 100755
index 00000000..dbfa524b
--- /dev/null
+++ b/projects/rapidjson/build.sh
@@ -0,0 +1,24 @@
+#!/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.
+#
+################################################################################
+
+if [[ $CFLAGS = *sanitize=memory* ]]
+then
+ export CXXFLAGS="$CXXFLAGS -DMSAN"
+fi
+
+$CXX $CXXFLAGS -D_GLIBCXX_DEBUG -I $SRC/rapidjson/include fuzzer.cpp $LIB_FUZZING_ENGINE -o $OUT/fuzzer
+cp fuzzer_seed_corpus.zip $OUT
diff --git a/projects/rapidjson/project.yaml b/projects/rapidjson/project.yaml
new file mode 100644
index 00000000..d54ac5db
--- /dev/null
+++ b/projects/rapidjson/project.yaml
@@ -0,0 +1,6 @@
+homepage: "https://github.com/tencent/rapidjson"
+primary_contact: "guidovranken@gmail.com"
+sanitizers:
+ - address
+ - undefined
+ - memory