[centipede] Fix centipede (#8467)

Pin centipede to a commit that builds.
Also remove 1.3GB of image bloat it adds
CC @ussuri @Alan32Liu 
Fixes #8458
This commit is contained in:
jonathanmetzman 2022-09-11 13:20:02 -04:00 committed by GitHub
parent 4e9d066356
commit d3e4ba3bb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 6 deletions

View File

@ -116,6 +116,10 @@ RUN git clone https://github.com/AFLplusplus/AFLplusplus.git aflplusplus && \
wget --no-check-certificate -O oss.sh https://raw.githubusercontent.com/vanhauser-thc/binary_blobs/master/oss.sh && \
chmod 755 oss.sh
# Do precompiles before copying other scripts for better cache efficiency.
COPY precompile_afl /usr/local/bin/
RUN precompile_afl
RUN cd $SRC && \
curl -L -O https://github.com/google/honggfuzz/archive/oss-fuzz.tar.gz && \
mkdir honggfuzz && \
@ -123,16 +127,15 @@ RUN cd $SRC && \
tar -xzv --strip-components=1 -f $SRC/oss-fuzz.tar.gz && \
rm -rf examples $SRC/oss-fuzz.tar.gz
RUN cd $SRC && \
git clone --depth 1 https://github.com/google/centipede.git
# Do precompiles before copying other scripts for better cache efficiency.
COPY precompile_afl /usr/local/bin/
RUN precompile_afl
COPY precompile_honggfuzz /usr/local/bin/
RUN precompile_honggfuzz
RUN cd $SRC && \
git clone https://github.com/google/centipede.git && \
cd centipede && \
git checkout a976295b2acaff8461a906c461f5bb25dafdf557
COPY precompile_centipede /usr/local/bin/
RUN precompile_centipede

View File

@ -32,4 +32,8 @@ bazel --bazelrc=/tmp/centipede.bazelrc build -c opt :all
/clang/bin/clang++ "$SRC/centipede/weak_sancov_stubs.cc" -c -o \
"$SRC/centipede/weak.o"
echo 'Removing extra stuff leftover to avoid bloating image.'
rm -rf /clang-*.tgz /clang /root/.cache/*
echo 'Done.'