From ee358c11e4a62b1b186a5bc4a430890eef006343 Mon Sep 17 00:00:00 2001 From: VZ Date: Wed, 25 Oct 2017 01:19:16 +0200 Subject: [PATCH] Add wxWidgets project (#913) Add the project file and simple Dockerfile and the build script using the fuzzer source in the main wxWidgets repository itself. --- projects/wxwidgets/Dockerfile | 22 ++++++++++++++++++++++ projects/wxwidgets/build.sh | 27 +++++++++++++++++++++++++++ projects/wxwidgets/project.yaml | 2 ++ 3 files changed, 51 insertions(+) create mode 100644 projects/wxwidgets/Dockerfile create mode 100755 projects/wxwidgets/build.sh create mode 100644 projects/wxwidgets/project.yaml diff --git a/projects/wxwidgets/Dockerfile b/projects/wxwidgets/Dockerfile new file mode 100644 index 000000000..e77cb2bc1 --- /dev/null +++ b/projects/wxwidgets/Dockerfile @@ -0,0 +1,22 @@ +# Copyright 2017 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 vadim@wxwidgets.org +RUN apt-get update && apt-get install -y make +RUN git clone --depth 1 https://github.com/wxWidgets/wxWidgets.git wxwidgets +WORKDIR wxwidgets +COPY build.sh $SRC/ diff --git a/projects/wxwidgets/build.sh b/projects/wxwidgets/build.sh new file mode 100755 index 000000000..279fc01ea --- /dev/null +++ b/projects/wxwidgets/build.sh @@ -0,0 +1,27 @@ +#!/bin/bash -eu +# Copyright 2017 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. +# +################################################################################ + +# build project +./configure --without-subdirs --disable-sys-libs --disable-gui +make -j$(nproc) wxbase + +# build fuzzers +$CXX $CXXFLAGS -o $OUT/zip ./tests/fuzz/zip.cpp \ + -lFuzzingEngine `./wx-config --cxxflags --libs base` + +# and copy their corpora +zip -j $OUT/zip_seed_corpus.zip $SRC/wxwidgets/tests/fuzz/corpus/zip/* diff --git a/projects/wxwidgets/project.yaml b/projects/wxwidgets/project.yaml new file mode 100644 index 000000000..17c648e47 --- /dev/null +++ b/projects/wxwidgets/project.yaml @@ -0,0 +1,2 @@ +homepage: "https://www.wxwidgets.org/" +primary_contact: "vzeitlin@gmail.com"