Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion projects/duckdb/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ make relassert CRASH_ON_ASSERT=1 DISABLE_SANITIZER=1
EXTENSION_LIBS=$(find ./build/relassert/extension/ -name "*.a")
THIRD_PARTY_LIBS=$(find ./build/relassert/third_party/ -name "*.a")
$CXX $CXXFLAGS $LIB_FUZZING_ENGINE ./test/ossfuzz/parse_fuzz_test.cpp \
-o $OUT/parse_fuzz_test -I./ -I./src/include \
-o $OUT/parse_fuzz_test -I./ -I./src/include -I./third_party/fmt/include \
-Wl,--start-group \
./build/relassert/src/libduckdb_static.a \
${EXTENSION_LIBS} ${THIRD_PARTY_LIBS} \
Expand Down
2 changes: 1 addition & 1 deletion projects/pjsip/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder:ubuntu-24-04
RUN apt-get update && apt-get install -y autoconf libtool-bin pkg-config libssl-dev zlib1g-dev
RUN apt-get update && apt-get install -y autoconf libtool-bin pkg-config libssl-dev zlib1g-dev libopus-dev libvpx-dev
RUN git clone https://github.com/pjsip/pjproject pjsip
COPY build.sh $SRC/
WORKDIR $SRC/pjsip/
6 changes: 6 additions & 0 deletions projects/pjsip/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ export LDFLAGS="$CFLAGS"
--disable-speex-aec --disable-g7221-codec \
--disable-resample --disable-libwebrtc --disable-libyuv

# Force static linking of libvpx and libopus so the fuzzers do not depend on
# .so files that are absent from the OSS-Fuzz runner image. libvpx-dev and
# libopus-dev both ship .a archives in /usr/lib/x86_64-linux-gnu/.
sed -i 's|-lvpx|/usr/lib/x86_64-linux-gnu/libvpx.a|g' build.mak
sed -i 's|-lopus|/usr/lib/x86_64-linux-gnu/libopus.a|g' build.mak

make dep
make -j$(nproc) --ignore-errors
make fuzz
Expand Down
29 changes: 29 additions & 0 deletions projects/pypy3/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################


FROM gcr.io/oss-fuzz-base/base-builder

RUN apt-get update && \
apt-get install -y gcc make libffi-dev pkg-config \
zlib1g-dev libbz2-dev libsqlite3-dev libncurses5-dev \
libexpat1-dev libssl-dev libgdbm-dev tk-dev libgc-dev \
liblzma-dev libncursesw5-dev \
pypy

RUN git clone --depth 1 --branch py3.11 https://github.com/pypy/pypy.git pypy
RUN git clone --depth 1 --branch main https://github.com/StanFromIreland/pypy-fuzz.git
WORKDIR pypy
COPY build.sh $SRC/
56 changes: 56 additions & 0 deletions projects/pypy3/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
#!/bin/bash -eu
# Copyright 2026 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################

case $SANITIZER in
address) SAN=-fsanitize=address ;;
undefined) SAN=-fsanitize=undefined ;;
*) SAN="" ;;
esac

CFLAGS=$(echo "$CFLAGS" | sed 's/-f[no-]*sanitize[^ ]*//g')

cd $SRC/pypy/pypy/goal
CC=clang pypy ../../rpython/bin/rpython --opt=2 --shared --source

BUILD_DIR=$(dirname $(find /tmp/usession-py3.11-* -name 'Makefile' | head -1))
make lldebug -j$(nproc) -C $BUILD_DIR "CC=clang $SAN"
cp $BUILD_DIR/pypy3*-c $BUILD_DIR/libpypy3*-c.so .
ln -sf libpypy3.11-c.so libpypy3-c.so

export LD_LIBRARY_PATH=$SRC/pypy/pypy/goal
PYPY=$SRC/pypy/pypy/goal/pypy3.11-c

# Build fuzz targets
cd $SRC/pypy-fuzz
while read -r name; do
CC=clang CFLAGS="$SAN" LDSHARED="clang -shared $SAN" $PYPY build_cffi_fuzz.py "$name"
clang $SAN $CFLAGS -fsanitize=fuzzer-no-link fuzzer_stub.c ./_pypy_fuzz_${name}.so \
-L$SRC/pypy/pypy/goal -lpypy3-c -Wl,-rpath,'$ORIGIN' \
$LIB_FUZZING_ENGINE -rdynamic -ldl -o fuzzer-${name}

cp fuzzer-${name} _pypy_fuzz_${name}.so fuzz_${name}.py $OUT/
if [ -d "corp-${name}" ]; then
zip -j "$OUT/fuzzer-${name}_seed_corpus.zip" corp-${name}/*
fi
if [ -f "dictionaries/fuzzer-${name}.dict" ]; then
cp "dictionaries/fuzzer-${name}.dict" "$OUT/"
fi
done < fuzz_targets.txt

cp $SRC/pypy/pypy/goal/libpypy3.11-c.so $OUT/libpypy3-c.so
cp ubsan_suppressions.txt $OUT/
cp -R $SRC/pypy/lib-python $OUT/
cp -R $SRC/pypy/lib_pypy $OUT/
9 changes: 9 additions & 0 deletions projects/pypy3/project.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
homepage: "https://pypy.org/"
language: c
main_repo: "https://github.com/pypy/pypy"
primary_contact: "stanulbrych@gmail.com"
auto_ccs:
- "matti.picus@gmail.com"
- "cfbolz@gmail.com"
sanitizers:
- undefined
Loading