Skip to content

Commit

Permalink
Merge branch 'sv/add-eager-endid-matching--WIP-fuzzing' into sv/tmp-i…
Browse files Browse the repository at this point in the history
…ntegration-branch-to-vendor-for-da2lx-subside-go-or-no-go
  • Loading branch information
silentbicycle committed Sep 13, 2024
2 parents 69f3bd7 + 4d75d30 commit 1389d29
Show file tree
Hide file tree
Showing 47 changed files with 3,793 additions and 43 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ SUBDIR += tests/equals
SUBDIR += tests/subtract
SUBDIR += tests/detect_required
SUBDIR += tests/determinise
SUBDIR += tests/eager_output
SUBDIR += tests/endids
SUBDIR += tests/epsilons
SUBDIR += tests/fsm
Expand Down
13 changes: 11 additions & 2 deletions fuzz/run_fuzzer
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ SECONDS=${SECONDS:-60}
WORKERS=${WORKERS:-4}
SEEDS=${SEEDS:-seeds}

if [ ${VALGRIND} ]; then
VALGRIND=valgrind
fi

if [ "${1}" = "-h" ]; then
echo "usage: $0"
echo " - set these via env: [WORKERS=${WORKERS}] [SECONDS=${SECONDS}] [SEEDS=seed_directory]"
Expand All @@ -21,6 +25,11 @@ if [ ! -e "${FUZZER}" ]; then
exit 1
fi

if [ -z "${MODE}" ]; then
echo "Did you mean to set MODE?"
exit 1
fi

UBSAN_OPTIONS="ASAN_OPTIONS=detect_leaks=0:halt_on_error=1 UBSAN_OPTIONS=print_stacktrace=1:halt_on_error=1"

if [ ! -d "${SEEDS}" ]; then
Expand All @@ -29,7 +38,7 @@ fi

if [ -z "${ARG}" ]; then
echo "\n==== ${FUZZER}"
exec ${FUZZER} -jobs=${WORKERS} -workers=${WORKERS} -max_total_time=${SECONDS} ${SEEDS}
exec ${VALGRIND} ${FUZZER} -jobs=${WORKERS} -workers=${WORKERS} -max_total_time=${SECONDS} ${SEEDS}
else
exec ${FUZZER} ${ARG}
exec ${VALGRIND} ${FUZZER} ${ARG}
fi
Loading

0 comments on commit 1389d29

Please sign in to comment.