aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/base-images/base-builder
diff options
context:
space:
mode:
authorGravatar Oliver Chang <oliverchang@users.noreply.github.com>2017-02-16 15:09:37 -0800
committerGravatar GitHub <noreply@github.com>2017-02-16 15:09:37 -0800
commit2e00fe90d193f7cb8ab82ec27e9b37a3ad02956c (patch)
tree3a735af9d9c61d905d5ed0ef94ca21fd8fb8bf0c /infra/base-images/base-builder
parent810b7fe47bf9e54a54ff36944f8860879af9dff2 (diff)
[infra] (experimental) Support building with AFL (#396)
Diffstat (limited to 'infra/base-images/base-builder')
-rw-r--r--infra/base-images/base-builder/Dockerfile2
-rw-r--r--infra/base-images/base-builder/compile_afl5
2 files changed, 6 insertions, 1 deletions
diff --git a/infra/base-images/base-builder/Dockerfile b/infra/base-images/base-builder/Dockerfile
index b9ad03c9..629132df 100644
--- a/infra/base-images/base-builder/Dockerfile
+++ b/infra/base-images/base-builder/Dockerfile
@@ -16,7 +16,7 @@
FROM ossfuzz/base-clang
MAINTAINER mike.aizatsky@gmail.com
-RUN apt-get install -y git subversion jq python3 zip
+RUN apt-get install -y git subversion jq python3 zip make
# Default build flags for various sanitizers.
ENV SANITIZER_FLAGS_address "-fsanitize=address"
diff --git a/infra/base-images/base-builder/compile_afl b/infra/base-images/base-builder/compile_afl
index 27a8d55d..fae25410 100644
--- a/infra/base-images/base-builder/compile_afl
+++ b/infra/base-images/base-builder/compile_afl
@@ -29,5 +29,10 @@ ar r $LIB_FUZZING_ENGINE $WORK/afl/*.o
popd > /dev/null
rm -rf $WORK/afl
+# Copy afl tools necessary for fuzzing.
+pushd $SRC/afl > /dev/null
+make clean && make
+find . -name 'afl-*' -executable -type f | xargs cp -t $OUT
+popd > /dev/null
echo " done."