Skip to content
Snippets Groups Projects
Commit 782b3662 authored by ale's avatar ale
Browse files

Small improvements to fuzzing script

parent adc1543a
No related branches found
No related tags found
1 merge request!5Refactor ticket deserialization code
#!/bin/sh
#
# Compile libsso with libfuzz, using a specific fuzz entry point.
# Useful libfuzz args include -jobs=N -workers=N for parallelization.
#
# Note: on Debian this probably requires CC=clang-11.
#
dir=$(dirname "$0")
dir=${dir:-.}
top_srcdir=${dir}/..
fuzz_src="$1"
if [ -z "$fuzz_src" ]; then
echo "Usage: $0 <target_source_file>" >&2
exit 2
fi
shift
set -e
make -C ${dir}/.. clean
make -C ${dir}/.. CC=${CC:-clang} CFLAGS='-g -fsanitize=address,fuzzer-no-link'
${CC:-clang} -I${dir}/.. -g -fsanitize=address,fuzzer -o fuzz "$@" -L${dir}/../.libs -lsso
LD_LIBRARY_PATH=${dir}/../.libs ./fuzz
make -C ${top_srcdir} clean
make -C ${top_srcdir} CC=${CC:-clang} CFLAGS='-g -fsanitize=address,fuzzer-no-link'
${CC:-clang} -I${top_srcdir} -g -fsanitize=address,fuzzer -o fuzz "${fuzz_src}" -L${top_srcdir}/.libs -lsso
LD_LIBRARY_PATH=${top_srcdir}/.libs ./fuzz "$@"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment