Skip to content

Commit

Permalink
switch to AFL++'s new pcguard instrumentation (#10427)
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc authored Jun 14, 2023
1 parent 31b8505 commit 373d221
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion infra/base-images/base-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ WORKDIR $SRC

RUN git clone https://github.com/AFLplusplus/AFLplusplus.git aflplusplus && \
cd aflplusplus && \
git checkout b81e0fece61d344b506c9d1aab7f69b89665ef81 && \
git checkout 091d66fa92cd9e4caa5829d579b1b996c49db8c9 && \
wget --no-check-certificate -O oss.sh https://raw.githubusercontent.com/vanhauser-thc/binary_blobs/master/oss.sh && \
rm -rf .git && \
chmod 755 oss.sh
Expand Down
7 changes: 2 additions & 5 deletions infra/base-images/base-builder/compile_afl
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@
#
################################################################################

# Temporarily disable randomization and enforce a safe and sane setup

# In emergencies where afl++'s own compiler fails set this to "1":
export AFL_LLVM_MODE_WORKAROUND=0
# If LLVM once again does weird changes then enable this:
#export AFL_LLVM_INSTRUMENT=LLVM-NATIVE

# AFL++ setup
echo "Copying precompiled AFL++"
Expand All @@ -44,7 +42,6 @@ export AFL_IGNORE_PROBLEMS=1
# No complain on unknown AFL environment variables
export AFL_IGNORE_UNKNOWN_ENVS=1


# Provide a way to document the AFL++ options used in this build:
echo
echo AFL++ target compilation setup:
Expand Down
4 changes: 0 additions & 4 deletions projects/libcacard/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@
#
################################################################################

# Workaround for fixing AFL++ build, discarded for others.
# See https://github.com/google/oss-fuzz/issues/4280#issuecomment-773977943
export AFL_LLVM_INSTRUMENT=CLASSIC,NGRAM-4

# Compile NSS
mkdir $SRC/nss-nspr
mv $SRC/nss $SRC/nss-nspr/
Expand Down
3 changes: 0 additions & 3 deletions projects/poppler/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ export PKG_CONFIG="`which pkg-config` --static"
export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig
export PATH=$PREFIX/bin:$PATH

# AFL++ specific setting
export AFL_LLVM_INSTRUMENT=NATIVE

BUILD=$WORK/build

rm -rf $WORK/*
Expand Down

0 comments on commit 373d221

Please sign in to comment.