aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/base-images
diff options
context:
space:
mode:
authorGravatar Abhishek Arya <inferno@chromium.org>2021-01-31 10:48:04 -0800
committerGravatar GitHub <noreply@github.com>2021-01-31 10:48:04 -0800
commit93eb6024f41e00aec2535c4e6056e83902088305 (patch)
tree69aa085117f1de680a58052067868f497d0eaa08 /infra/base-images
parent42018eeb1cf2e1f3cffa15690988e183e73e6ecd (diff)
Add AFL_MAP_SIZE in run_fuzzer
Otherwise get errors like these for libsass. [+] All right - fork server is up.  [-] PROGRAM ABORT : AFL_MAP_SIZE is not set and fuzzing target reports that the required size is very large. Solution: Run the fuzzing target stand-alone with the environment variable AFL_DEBUG=1 set and set the value for __afl_final_loc in the AFL_MAP_SIZE environment variable for afl-fuzz. Location : report_error_and_exit(), src/afl-forkserver.c:321
Diffstat (limited to 'infra/base-images')
-rwxr-xr-xinfra/base-images/base-runner/run_fuzzer1
1 files changed, 1 insertions, 0 deletions
diff --git a/infra/base-images/base-runner/run_fuzzer b/infra/base-images/base-runner/run_fuzzer
index 2b791aab..d61c299b 100755
--- a/infra/base-images/base-runner/run_fuzzer
+++ b/infra/base-images/base-runner/run_fuzzer
@@ -103,6 +103,7 @@ if [[ "$FUZZING_ENGINE" = afl ]]; then
export AFL_I_DONT_CARE_ABOUT_MISSING_CRASHES=1
export AFL_SKIP_CPUFREQ=1
export AFL_NO_AFFINITY=1
+ export AFL_MAP_SIZE=4194304
# 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"