Merge commit '3105cc20ef3173b87fdc1688962ed6318a1fd039'

This commit is contained in:
Green Sky
2025-03-12 19:16:50 +01:00
130 changed files with 3604 additions and 1776 deletions

View File

@ -3,19 +3,23 @@
# We want to use the latest tools always
FROM gcr.io/oss-fuzz-base/base-builder:latest
RUN apt-get update && \
apt-get -y install --no-install-suggests --no-install-recommends \
cmake libtool autoconf automake pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get -y install --no-install-suggests --no-install-recommends \
cmake \
pkg-config \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Static builds of dependencies
# libsodium
RUN git clone --depth 1 --branch 1.0.18 https://github.com/jedisct1/libsodium libsodium
WORKDIR $SRC/libsodium
RUN ./autogen.sh && ./configure --enable-shared=no && make install
WORKDIR $SRC
RUN tar zxf <(curl -L https://github.com/jedisct1/libsodium/releases/download/1.0.20-RELEASE/libsodium-1.0.20.tar.gz) \
&& cd libsodium-* \
&& ./configure --enable-shared=no \
&& make install \
&& cd ..
# Copy your project's source code.
COPY . $SRC/c-toxcore

View File

@ -1,6 +1,16 @@
#!/bin/bash -eu
FUZZ_TARGETS="bootstrap_fuzz_test toxsave_fuzz_test"
FUZZ_TARGETS=(
DHT_fuzz_test
bootstrap_fuzz_test
# e2e_fuzz_test
forwarding_fuzz_test
group_announce_fuzz_test
group_moderation_fuzz_test
net_crypto_fuzz_test
tox_events_fuzz_test
toxsave_fuzz_test
)
# out of tree build
cd "$WORK"
@ -12,11 +22,10 @@ cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER="$CC" \
-DCMAKE_CXX_COMPILER="$CXX" \
-DCMAKE_C_FLAGS="$CFLAGS" \
-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="$LIB_FUZZING_ENGINE" \
-DBUILD_TOXAV=OFF -DENABLE_SHARED=NO -DBUILD_FUZZ_TESTS=ON \
-DDHT_BOOTSTRAP=OFF -DBOOTSTRAP_DAEMON=OFF "$SRC"/c-toxcore
for TARGET in $FUZZ_TARGETS; do
for TARGET in "${FUZZ_TARGETS[@]}"; do
# build fuzzer target
cmake --build ./ --target "$TARGET"