feat: improve2

This commit is contained in:
SekoiaTree 2025-05-15 19:29:02 +02:00
parent 49f3b025fd
commit 776b5fcdd6
2 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,26 @@
diff --git a/infra/helper.py b/infra/helper.py
index edf073458..a595dbfbb 100755
--- a/infra/helper.py
+++ b/infra/helper.py
@@ -1448,6 +1448,8 @@ def run_fuzzer(args):
'%s:/out' % args.project.out,
'-t',
BASE_RUNNER_IMAGE,
+ 'timeout',
+ '14400',
'run_fuzzer',
args.fuzzer_name,
] + args.fuzzer_args)
diff --git a/projects/libpng/Dockerfile b/projects/libpng/Dockerfile
index 6f281cd55..3017d4404 100644
--- a/projects/libpng/Dockerfile
+++ b/projects/libpng/Dockerfile
@@ -19,6 +19,7 @@ RUN apt-get update && \
apt-get install -y make autoconf automake libtool zlib1g-dev
RUN git clone --depth 1 https://github.com/madler/zlib.git
-RUN git clone --depth 1 https://github.com/pnggroup/libpng.git
+RUN git clone --depth 1 --branch BRANCH_TO_CHECKOUT https://github.com/SekoiaTree/libpng.git
+#FUZZ_SEED_DISABLE RUN sed -i 's/libpng_read_fuzzer_seed_corpus\.zip/libpng_read_fuzzer_seed_corpus.zip.disabled/g' $SRC/build.sh
RUN cp libpng/contrib/oss-fuzz/build.sh $SRC
WORKDIR libpng

16
part3/improve2/run.improve2.sh Executable file
View file

@ -0,0 +1,16 @@
#!/bin/bash
COMMIT_HASH="153dfb75531c0b73499cef9380357fe0c49a3968"
git clone https://github.com/SekoiaTree/oss-fuzz.git oss-fuzz-i1
cd oss-fuzz-i1
git checkout $COMMIT_HASH
sed -i 's/BRANCH_TO_CHECKOUT/improve2/g' projects/libpng/Dockerfile
python3 infra/helper.py build_image --pull libpng
python3 infra/helper.py build_fuzzers --clean libpng
mkdir -p build/out/corpus
python3 infra/helper.py run_fuzzer libpng libpng_read_fuzzer --corpus-dir build/out/corpus
python3 infra/helper.py build_fuzzers --sanitizer coverage libpng
# no-serve: to exit immediately
# port: in case port 8008 is already allocated, even with no-serve it fails otherwise...
python3 infra/helper.py coverage libpng --corpus-dir build/out/corpus --fuzz-target libpng_read_fuzzer --no-serve --port 9531