Revert "[upb] New Project: upb (#2538)" (#2553)

This reverts commit d5992e4ef5.

Upb is causing exceptions in ClusterFuzz and is completely broken
for AFL and libFuzzer.
This commit is contained in:
jonathanmetzman 2019-06-30 17:13:43 -07:00 committed by GitHub
parent f3fd7d1dcb
commit 6fa5719612
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 95 deletions

View File

@ -1,36 +0,0 @@
# 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 haberman@google.com
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
python-dev \
python-future \
rsync \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install Bazel from apt-get to ensure dependencies are there
RUN echo "deb [arch=amd64] http://storage.googleapis.com/bazel-apt stable jdk1.8" | tee /etc/apt/sources.list.d/bazel.list
RUN curl https://bazel.build/bazel-release.pub.gpg | apt-key add -
RUN apt-get update && apt-get install -y bazel
RUN git clone --depth 1 https://github.com/protocolbuffers/upb.git upb
WORKDIR upb
COPY build.sh $SRC/

View File

@ -1,55 +0,0 @@
#!/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.
#
################################################################################
FUZZER_DICTIONARIES="\
"
NO_VPTR="--copt=-fno-sanitize=vptr --linkopt=-fno-sanitize=vptr"
EXTRA_BAZEL_FLAGS="--strip=never $(for f in $CXXFLAGS; do if [ $f != "-stdlib=libc++" ] ; then echo --copt=$f --linkopt=$f; fi; done)"
bazel build --dynamic_mode=off --spawn_strategy=standalone --genrule_strategy=standalone \
--verbose_failures \
$EXTRA_BAZEL_FLAGS \
$NO_VPTR \
-k \
:file_descriptor_parsenew_fuzzer
# Copied from projects/envoy/build.sh which also uses Bazel.
# Profiling with coverage requires that we resolve+copy all Bazel symlinks and
# also remap everything under proc/self/cwd to correspond to Bazel build paths.
if [ "$SANITIZER" = "coverage" ]
then
# The build invoker looks for sources in $SRC, but it turns out that we need
# to not be buried under src/, paths are expected at out/proc/self/cwd by
# the profiler.
declare -r REMAP_PATH="${OUT}/proc/self/cwd"
mkdir -p "${REMAP_PATH}"
rsync -av "${SRC}"/upb "${REMAP_PATH}"
fi
file=file_descriptor_parsenew_fuzzer
echo "${file}"
TARGET_DRIVERLESS=bazel-bin/"${file}"
echo "copying fuzzer"
cp "${TARGET_DRIVERLESS}" "${OUT}"/"${file}"_fuzz_test
# Copy dictionaries and options files to $OUT/
for dict in $FUZZER_DICTIONARIES; do
cp $dict $OUT/
done
# Don't have a consistent naming convention between fuzzer files and corpus
# directories so we resort to hard coding zipping corpses
zip $OUT/file_descriptor_parsenew_fuzzer_seed_corpus.zip tests/*

View File

@ -1,4 +0,0 @@
homepage: "<https://github.com/protocolbuffers/upb>"
primary_contact: "<jhaberman@gmail.com>"
sanitizers:
- address