Skip to content

Commit

Permalink
opt test
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc committed Sep 12, 2023
1 parent 172db4b commit 73a28e3
Show file tree
Hide file tree
Showing 18 changed files with 327 additions and 85 deletions.
2 changes: 1 addition & 1 deletion fuzzers/aflplusplus/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ RUN apt-get update && \
# Download afl++.
RUN git clone -b dev https://github.com/AFLplusplus/AFLplusplus /afl && \
cd /afl && \
git checkout c60431247e971881bc159a84e5505dfec7adcf6d || \
git checkout 3b835b7c8b2f73be6d5972951d049cef66c24abd || \
true

# Build without Python support as we don't need it.
Expand Down
2 changes: 1 addition & 1 deletion fuzzers/aflplusplus_frida/builder.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && \

# Download afl++
RUN git clone https://github.com/AFLplusplus/AFLplusplus.git /afl && \
cd /afl && git checkout c60431247e971881bc159a84e5505dfec7adcf6d
cd /afl && git checkout 3b835b7c8b2f73be6d5972951d049cef66c24abd

# Build afl++ without Python support as we don't need it.
# Set AFL_NO_X86 to skip flaky tests.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ RUN apt-get update && \
libstdc++-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-dev

# Download afl++.
RUN git clone -b pendfav https://github.com/AFLplusplus/AFLplusplus /afl && \
RUN git clone -b dev https://github.com/AFLplusplus/AFLplusplus /afl && \
cd /afl && \
git checkout cd6b89eb74cc501a67b1c14a4433a496b2053eec || \
git checkout 3b835b7c8b2f73be6d5972951d049cef66c24abd || \
true

# Build without Python support as we don't need it.
# Set AFL_NO_X86 to skip flaky tests.
RUN cd /afl && \
sed -i 's/"-O3"/"-O0"/' src/afl-cc.c && \
unset CFLAGS CXXFLAGS && \
export CC=clang AFL_NO_X86=1 && \
PYTHON_INCLUDE=/ make && \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ RUN apt-get update && \
libstdc++-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-dev

# Download afl++.
RUN git clone -b reinit https://github.com/AFLplusplus/AFLplusplus /afl && \
RUN git clone -b dev https://github.com/AFLplusplus/AFLplusplus /afl && \
cd /afl && \
git checkout 87b33740ea426bac276a9eb4bc5f201bd396b6dc || \
git checkout 3b835b7c8b2f73be6d5972951d049cef66c24abd || \
true

# Build without Python support as we don't need it.
# Set AFL_NO_X86 to skip flaky tests.
RUN cd /afl && \
sed -i 's/"-O3"/"-O1"/' src/afl-cc.c && \
unset CFLAGS CXXFLAGS && \
export CC=clang AFL_NO_X86=1 && \
PYTHON_INCLUDE=/ make && \
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,36 @@
ARG parent_image
FROM $parent_image

# Install the necessary packages.
RUN apt-get update && \
apt-get install -y \
build-essential \
python3-dev \
python3-setuptools \
automake \
cmake \
git \
flex \
bison \
libglib2.0-dev \
libpixman-1-dev \
cargo \
libgtk-3-dev \
# for QEMU mode
ninja-build \
gcc-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-plugin-dev \
libstdc++-$(gcc --version|head -n1|sed 's/\..*//'|sed 's/.* //')-dev

# Download afl++.
RUN git clone -b dev https://github.com/AFLplusplus/AFLplusplus /afl && \
cd /afl && \
git checkout 3b835b7c8b2f73be6d5972951d049cef66c24abd || \
true

# Download afl++
RUN git clone -b tcg_cov https://github.com/WorksButNotTested/AFLplusplus /afl && \
cd /afl && git checkout 54fb2d0 || true

# Build afl++ without Python support as we don't need it.
# Build without Python support as we don't need it.
# Set AFL_NO_X86 to skip flaky tests.
RUN cd /afl && \
unset CFLAGS && unset CXXFLAGS && \
AFL_NO_X86=1 CC=clang PYTHON_INCLUDE=/ make && \
cd qemu_mode && ./build_qemu_support.sh && cd .. && \
make -C utils/aflpp_driver && \
cp utils/aflpp_driver/libAFLQemuDriver.a /libAFLDriver.a && \
cp utils/aflpp_driver/aflpp_qemu_driver_hook.so /
sed -i 's/"-O3"/"-O2"/' src/afl-cc.c && \
unset CFLAGS CXXFLAGS && \
export CC=clang AFL_NO_X86=1 && \
PYTHON_INCLUDE=/ make && \
cp utils/aflpp_driver/libAFLDriver.a /
14 changes: 14 additions & 0 deletions fuzzers/aflplusplus_o2/description.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# aflplusplus

AFL++ fuzzer instance that has the following config active for all benchmarks:
- PCGUARD instrumentation
- cmplog feature
- dict2file feature
- "fast" power schedule
- persistent mode + shared memory test cases

Repository: [https://github.com/AFLplusplus/AFLplusplus/](https://github.com/AFLplusplus/AFLplusplus/)

[builder.Dockerfile](builder.Dockerfile)
[fuzzer.py](fuzzer.py)
[runner.Dockerfile](runner.Dockerfile)
Loading

0 comments on commit 73a28e3

Please sign in to comment.