[knot-dns] link against liblmdb statically (#3797)

Relates to d4ec3a3aa8

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22191
This commit is contained in:
Daniel Salzman 2020-05-16 18:02:22 +02:00 committed by GitHub
parent 6b9b08eb60
commit 261abce857
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -37,6 +37,7 @@ RUN git clone git://git.savannah.gnu.org/gnulib.git
RUN git clone --depth=1 --recursive https://git.savannah.gnu.org/git/libunistring.git
RUN git clone --depth=1 https://git.lysator.liu.se/nettle/nettle.git
RUN git clone --depth=1 https://gitlab.com/gnutls/gnutls.git
RUN git clone --depth=1 https://github.com/LMDB/lmdb.git
RUN git clone --depth=1 https://gitlab.labs.nic.cz/knot/knot-dns
WORKDIR knot-dns

View File

@ -56,20 +56,22 @@ CFLAGS="$GNUTLS_CFLAGS" \
make -j$(nproc)
make install
cd $SRC/lmdb/libraries/liblmdb
make -j$(nproc)
make install
# Compile knot, install fuzzers to $OUT
cd $SRC/knot-dns
sed -i 's/-llmdb/-Wl,-Bstatic,-llmdb,-Bdynamic/' configure.ac
autoreconf -if
./configure --with-oss-fuzz=yes --disable-shared --enable-static --disable-daemon --disable-utilities --disable-documentation --disable-fastparser --disable-modules
./configure --with-oss-fuzz=yes --disable-shared --enable-static --disable-daemon --disable-utilities --disable-documentation \
--disable-fastparser --disable-modules
make -j$(nproc)
cd $SRC/knot-dns/tests-fuzz
make check
/bin/bash ../libtool --mode=install /usr/bin/install -c fuzz_packet fuzz_zscanner fuzz_dname_to_str fuzz_dname_from_str "$OUT"
# Set up fuzzing seeds
git submodule update --init -- ./fuzz_packet.in