[dump_coverage]=1
[runs]=0)
-declare -A LIB_DIRS=([x86_64]="/sanitized/usr/lib64"
- [i686]="/sanitized/usr/lib")
+declare -A LIB_DIRS=([x86_64]="usr/lib64"
+ [i686]="usr/lib")
########################################################
# GLOBAL OPTIONS PARSING
# get the sanitized libraries directory (used in LD_PRELOAD and LD_LIBRARY_PATH)
arch=$(sdb_shell_verbose uname -m)
-lib_dir=${LIB_DIRS[$arch]}
+lib_dir="/sanitized/${LIB_DIRS[$arch]}"
# parse .options file if it exists
options=$(sdb_shell_verbose "[[ -f ${options_file} ]] && cat ${options_file} || true")
echo "ASAN_OPTIONS=${asan_opts_str}"
echo "LIBFUZZER_OPTIONS='${libfuzzer_opts_arr[*]}'"
echo "LD_LIBRARY_PATH=${lib_dir}"
-echo "LD_PRELOAD=${lib_dir}/libasan.so"
+echo "LD_PRELOAD=/${LIB_DIRS[$arch]}/libasan.so"
if (( DUMP_COVERAGE == 1 )); then
exec_dir="${coverage_dir}"
${SDB_CMD} shell cd "${exec_dir}" '&&' \
export "ASAN_OPTIONS=${asan_opts_str}" '&&' \
export "LD_LIBRARY_PATH=${lib_dir}" '&&' \
- export "LD_PRELOAD=${lib_dir}/libasan.so" '&&' \
+ export "LD_PRELOAD=/${LIB_DIRS[$arch]}/libasan.so" '&&' \
"${target_bin}" "${libfuzzer_opts_arr[@]}" "${generated_corpus_dir}" "${seed_corpus_dir}"
# print ASan logs if any