This commit is contained in:
vanhauser-thc 2023-03-28 16:50:05 +02:00
parent b1bfc1ae76
commit 01236f47bc
3 changed files with 8 additions and 3 deletions

View File

@ -59,6 +59,9 @@ RUN apt-get update && \
# gcc-multilib is only used for -m32 support on x86
# libcapstone-dev is used for coresight_mode on arm64
RUN apt-get install -y --no-install-recommends \
wget software-properties-common gnupg
RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 0 && \
update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${GCC_VERSION} 0 && \
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${LLVM_VERSION} 0 && \
@ -67,6 +70,8 @@ RUN update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${GCC_VERSION} 0
RUN wget -qO- https://sh.rustup.rs | CARGO_HOME=/etc/cargo sh -s -- -y -q --no-modify-path
ENV PATH=$PATH:/etc/cargo/bin
RUN apt clean -y
ENV LLVM_CONFIG=llvm-config-${LLVM_VERSION}
ENV AFL_SKIP_CPUFREQ=1
ENV AFL_TRY_AFFINITY=1
@ -92,4 +97,4 @@ RUN sed -i.bak 's/^ -/ /g' GNUmakefile && \
RUN echo "set encoding=utf-8" > /root/.vimrc && \
echo ". /etc/bash_completion" >> ~/.bashrc && \
echo 'alias joe="joe --wordwrap --joe_state -nobackup"' >> ~/.bashrc && \
echo "export PS1='"'[afl++ \h] \w$(__git_ps1) \$ '"'" >> ~/.bashrc
echo "export PS1='"'[afl++ \h] \w \$ '"'" >> ~/.bashrc

View File

@ -2084,7 +2084,7 @@ havoc_stage:
}
if (afl->stage_max < HAVOC_MIN) { afl->stage_max = HAVOC_MIN; }
if (unlikely(afl->stage_max < HAVOC_MIN)) { afl->stage_max = HAVOC_MIN; }
temp_len = len;

View File

@ -133,7 +133,7 @@ test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" -o "$SYS" = "i86pc
SKIP=
test -e ../${AFL_CLANG} -a -e ../afl-showmap -a -e ../afl-fuzz && {
../${AFL_CLANG} -v 2>&1 | grep -qi "clang version" && {
../${AFL_CLANG} -o test-instr.plain -O0 ../test-instr.c > /dev/null 2>&1
../${AFL_CLANG} -O0 -o test-instr.plain ../test-instr.c > /dev/null 2>&1
AFL_HARDEN=1 ../${AFL_CLANG} -o test-compcov.harden test-compcov.c > /dev/null 2>&1
test -e test-instr.plain && {
$ECHO "$GREEN[+] ${AFL_CLANG} compilation succeeded"