mirror of https://github.com/google/oss-fuzz.git
grpc: fix build (#7307)
* grpc: fix build * dont use old patch * re-enable build file * no options
This commit is contained in:
parent
008a040ac0
commit
15e56374d8
|
@ -17,11 +17,10 @@
|
||||||
FROM gcr.io/oss-fuzz-base/base-builder
|
FROM gcr.io/oss-fuzz-base/base-builder
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y software-properties-common
|
RUN apt-get update && apt-get install -y software-properties-common
|
||||||
RUN add-apt-repository ppa:webupd8team/java
|
|
||||||
RUN apt-get update && apt-get -y install \
|
RUN apt-get update && apt-get -y install \
|
||||||
vim \
|
vim \
|
||||||
build-essential \
|
build-essential \
|
||||||
openjdk-8-jdk \
|
openjdk-11-jre-headless \
|
||||||
make \
|
make \
|
||||||
curl \
|
curl \
|
||||||
autoconf \
|
autoconf \
|
||||||
|
@ -29,21 +28,18 @@ RUN apt-get update && apt-get -y install \
|
||||||
rsync
|
rsync
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
python-all-dev \
|
python-all-dev \
|
||||||
python3-all-dev \
|
python3-all-dev
|
||||||
python-pip
|
|
||||||
|
|
||||||
# Install Python packages from PyPI
|
# Install Python packages from PyPI
|
||||||
RUN pip install --upgrade pip==10.0.1
|
RUN python3 -m pip install --upgrade pip
|
||||||
RUN pip install virtualenv
|
RUN python3 -m pip install virtualenv
|
||||||
RUN pip install incremental==16.10.1
|
RUN python3 -m pip install incremental futures enum34 protobuf six twisted
|
||||||
RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.5.2.post1 six==1.10.0 twisted==17.5.0
|
|
||||||
|
|
||||||
#========================
|
RUN git clone --recursive https://github.com/grpc/grpc grpc && \
|
||||||
# Bazel installation
|
cd grpc && \
|
||||||
|
git submodule update --init
|
||||||
|
|
||||||
RUN git clone --recursive https://github.com/grpc/grpc grpc
|
|
||||||
WORKDIR $SRC/grpc/
|
WORKDIR $SRC/grpc/
|
||||||
COPY build.sh $SRC/
|
COPY build.sh $SRC/
|
||||||
|
|
|
@ -18,10 +18,6 @@
|
||||||
set -o errexit
|
set -o errexit
|
||||||
set -o nounset
|
set -o nounset
|
||||||
|
|
||||||
readonly FUZZER_DICTIONARIES=(
|
|
||||||
test/core/end2end/fuzzers/hpack.dictionary
|
|
||||||
)
|
|
||||||
|
|
||||||
readonly FUZZER_TARGETS=(
|
readonly FUZZER_TARGETS=(
|
||||||
test/core/json:json_fuzzer
|
test/core/json:json_fuzzer
|
||||||
test/core/uri:uri_fuzzer_test
|
test/core/uri:uri_fuzzer_test
|
||||||
|
@ -33,8 +29,6 @@ readonly FUZZER_TARGETS=(
|
||||||
test/core/slice:percent_encode_fuzzer
|
test/core/slice:percent_encode_fuzzer
|
||||||
test/core/transport/chttp2:hpack_parser_fuzzer
|
test/core/transport/chttp2:hpack_parser_fuzzer
|
||||||
test/core/end2end/fuzzers:client_fuzzer
|
test/core/end2end/fuzzers:client_fuzzer
|
||||||
test/core/end2end/fuzzers:server_fuzzer
|
|
||||||
test/core/security:ssl_server_fuzzer
|
|
||||||
test/core/security:alts_credentials_fuzzer
|
test/core/security:alts_credentials_fuzzer
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -67,8 +61,6 @@ fi
|
||||||
|
|
||||||
tools/bazel build \
|
tools/bazel build \
|
||||||
--dynamic_mode=off \
|
--dynamic_mode=off \
|
||||||
--spawn_strategy=standalone \
|
|
||||||
--genrule_strategy=standalone \
|
|
||||||
${NO_VPTR} \
|
${NO_VPTR} \
|
||||||
--strip=never \
|
--strip=never \
|
||||||
--linkopt=-lc++ \
|
--linkopt=-lc++ \
|
||||||
|
@ -77,7 +69,7 @@ tools/bazel build \
|
||||||
--linkopt=${LIB_FUZZING_ENGINE} \
|
--linkopt=${LIB_FUZZING_ENGINE} \
|
||||||
${EXTRA_BAZEL_FLAGS} \
|
${EXTRA_BAZEL_FLAGS} \
|
||||||
${FUZZER_TARGETS[@]} \
|
${FUZZER_TARGETS[@]} \
|
||||||
--verbose_failures
|
--verbose_failures -s
|
||||||
|
|
||||||
# Profiling with coverage requires that we resolve+copy all Bazel symlinks and
|
# 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.
|
# also remap everything under proc/self/cwd to correspond to Bazel build paths.
|
||||||
|
@ -119,13 +111,6 @@ for target in "${FUZZER_TARGETS[@]}"; do
|
||||||
cp "bazel-bin/$fuzzer_name" "$OUT/"
|
cp "bazel-bin/$fuzzer_name" "$OUT/"
|
||||||
done
|
done
|
||||||
|
|
||||||
# Copy dictionaries and options files to $OUT/
|
|
||||||
for dict in "${FUZZER_DICTIONARIES[@]}"; do
|
|
||||||
cp "${dict}" "${OUT}/"
|
|
||||||
done
|
|
||||||
|
|
||||||
cp ${SRC}/grpc/tools/fuzzer/options/*.options "${OUT}/"
|
|
||||||
|
|
||||||
# We don't have a consistent naming convention between fuzzer files and corpus
|
# We don't have a consistent naming convention between fuzzer files and corpus
|
||||||
# directories so we resort to hard coding zipping corpuses
|
# directories so we resort to hard coding zipping corpuses
|
||||||
zip "${OUT}/json_fuzzer_seed_corpus.zip" test/core/json/corpus/*
|
zip "${OUT}/json_fuzzer_seed_corpus.zip" test/core/json/corpus/*
|
||||||
|
|
Loading…
Reference in New Issue