Skip to content

Commit

Permalink
created modified benchmark
Browse files Browse the repository at this point in the history
  • Loading branch information
ardier committed Nov 26, 2024
1 parent d8a7723 commit 332794a
Show file tree
Hide file tree
Showing 7 changed files with 96 additions and 2 deletions.
Binary file not shown.
29 changes: 29 additions & 0 deletions benchmarks/freetype2_ftfuzzer_libafl/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM gcr.io/oss-fuzz-base/base-builder

# Install necessary dependencies
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y \
make \
autoconf \
libtool \
wget

# Clone necessary repositories
RUN git clone git://git.sv.nongnu.org/freetype/freetype2.git $SRC/freetype2
RUN git clone https://github.com/unicode-org/text-rendering-tests.git $SRC/TRT
RUN wget https://github.com/libarchive/libarchive/releases/download/v3.4.3/libarchive-3.4.3.tar.xz -P $SRC/

# Copy all files into $SRC directory
COPY * $SRC/

# Download and extract the seeds tarball into $SRC/seeds
RUN wget https://raw.githubusercontent.com/ardier/fuzzbench/minimized-subsumed-mutants-benchmark-with-seeds/benchmarks/freetype2_ftfuzzer_libafl/seeds.tar -O $SRC/seeds.tar && \
mkdir -p $SRC/seeds && \
tar -xvf $SRC/seeds.tar -C $SRC/seeds && \
rm $SRC/seeds.tar

# Clean up temporary files
RUN mkdir -p $SRC/corpus
ENV FUZZER_SEEDS="$SRC/seeds"
ENV FUZZER_CORPUS="$SRC/corpus"
18 changes: 18 additions & 0 deletions benchmarks/freetype2_ftfuzzer_libafl/benchmark.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Copyright 2020 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.

commit: cd02d359a6d0455e9d16b87bf9665961c4699538
commit_date: 2023-01-28T16:04:38+00:00
fuzz_target: ftfuzzer
project: freetype2
39 changes: 39 additions & 0 deletions benchmarks/freetype2_ftfuzzer_libafl/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
#!/bin/bash -ex
# Copyright 2020 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.

mkdir $OUT/seeds
# TRT/fonts is the full seed folder, but they're too big
cp TRT/fonts/TestKERNOne.otf $OUT/seeds/
cp TRT/fonts/TestGLYFOne.ttf $OUT/seeds/
cp seeds/* $OUT/seeds/

tar xf libarchive-3.4.3.tar.xz

cd libarchive-3.4.3
./configure --disable-shared
make clean
make -j $(nproc)
make install
cd ..

cd freetype2
./autogen.sh
./configure --with-harfbuzz=no --with-bzip2=no --with-png=no --without-zlib
make clean
make all -j $(nproc)

$CXX $CXXFLAGS -std=c++11 -I include -I . src/tools/ftfuzzer/ftfuzzer.cc \
objs/.libs/libfreetype.a $FUZZER_LIB -L /usr/local/lib -larchive \
-o $OUT/ftfuzzer
4 changes: 2 additions & 2 deletions service/experiment-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
# Unless you are a fuzzbench maintainer running this service, this
# will not work with your setup.

trials: 20
max_total_time: 82800 # 23 hours, the default time for preemptible experiments.
trials: 5
max_total_time: 3600
cloud_project: fuzzbench
docker_registry: gcr.io/fuzzbench
cloud_compute_zone: us-central1-c
Expand Down
7 changes: 7 additions & 0 deletions service/experiment-requests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@
# Please add new experiment requests towards the top of this file.
#

- experiment: 2024-11-26-afl-mutants
description: "Benchmark afl with freetype2"
fuzzers:
- afl
benchmarks:
- freetype2_ftfuzzer_libafl

- experiment: 2023-06-12-aflpp
description: "Benchmark afl++ releases and newmutation"
fuzzers:
Expand Down
1 change: 1 addition & 0 deletions service/gcbrun_experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
from the last PR comment containing "/gcbrun" and pass it to run_experiment.py
which will run an experiment."""

# dummy comment for experiment
import logging
import os
import sys
Expand Down

0 comments on commit 332794a

Please sign in to comment.