From f5f49fdc7f7c683c97c9be50c514916f8efa866c Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Tue, 30 Jul 2019 16:11:27 +0200 Subject: [PATCH] [cryptofuzz] Cityhash reference implementation (#2636) --- projects/cryptofuzz/Dockerfile | 1 + projects/cryptofuzz/build.sh | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/projects/cryptofuzz/Dockerfile b/projects/cryptofuzz/Dockerfile index 782b65b93..1dc4c63f2 100644 --- a/projects/cryptofuzz/Dockerfile +++ b/projects/cryptofuzz/Dockerfile @@ -37,6 +37,7 @@ RUN wget https://gnupg.org/ftp/gcrypt/libgpg-error/libgpg-error-1.36.tar.bz2 RUN git clone --depth 1 -b oss-fuzz https://github.com/project-everest/hacl-star evercrypt RUN wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_0-stable.zip RUN wget https://github.com/openssl/openssl/archive/OpenSSL_1_0_2-stable.zip +RUN git clone --depth 1 https://github.com/google/cityhash.git RUN apt-get remove -y libunwind8 COPY build.sh $SRC/ diff --git a/projects/cryptofuzz/build.sh b/projects/cryptofuzz/build.sh index 3af8c804f..b6244ffed 100755 --- a/projects/cryptofuzz/build.sh +++ b/projects/cryptofuzz/build.sh @@ -36,6 +36,14 @@ then export CXXFLAGS="$CXXFLAGS -DMSAN" fi +# Compile Cityhash +cd $SRC/cityhash +./configure >/dev/null 2>&1 +make -j$(nproc) >/dev/null 2>&1 + +export CXXFLAGS="$CXXFLAGS -I$SRC/cityhash/src" +export CRYPTOFUZZ_REFERENCE_CITY_O_PATH="$SRC/cityhash/src/city.o" + ############################################################################## if [[ $CFLAGS != *sanitize=memory* ]] then