diff options
Diffstat (limited to 'infra/base-images/base-runner/run_fuzzer')
-rwxr-xr-x | infra/base-images/base-runner/run_fuzzer | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/infra/base-images/base-runner/run_fuzzer b/infra/base-images/base-runner/run_fuzzer index 79248711..6464ddc2 100755 --- a/infra/base-images/base-runner/run_fuzzer +++ b/infra/base-images/base-runner/run_fuzzer @@ -106,9 +106,15 @@ if [[ "$FUZZING_ENGINE" = afl ]]; then export AFL_NO_AFFINITY=1 export AFL_FAST_CAL=1 export AFL_MAP_SIZE=4194304 + # If $OUT/afl_cmplog.txt is present this means the target was compiled for + # CMPLOG. So we have to add the proper parameters to afl-fuzz. `-l 2` is + # CMPLOG level 2, which will colorize larger files but not huge files and + # not enable transform analysis unless there have been several cycles without + # any finds. + test -e $OUT/afl_cmplog.txt && AFL_FUZZER_ARGS="$AFL_FUZZER_ARGS -l 2 -c $OUT/$FUZZER" # AFL expects at least 1 file in the input dir. echo input > ${CORPUS_DIR}/input - CMD_LINE="$OUT/afl-fuzz $AFL_FUZZER_ARGS -i $CORPUS_DIR -o $FUZZER_OUT $(get_dictionary) $* $OUT/$FUZZER" + CMD_LINE="$OUT/afl-fuzz $AFL_FUZZER_ARGS -i $CORPUS_DIR -o $FUZZER_OUT $(get_dictionary) $* -- $OUT/$FUZZER" elif [[ "$FUZZING_ENGINE" = honggfuzz ]]; then |