From 48e39e44dbe267f8945e9d597e61fd8aa3dfb376 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 28 Apr 2025 22:09:29 +0200 Subject: Improved fuzzing. --- bin/rtt-fuzz | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'bin/rtt-fuzz') diff --git a/bin/rtt-fuzz b/bin/rtt-fuzz index d7f2aef..464ff34 100755 --- a/bin/rtt-fuzz +++ b/bin/rtt-fuzz @@ -1,6 +1,6 @@ #!/bin/bash -TITLE=$1 +export TITLE=$1 shift if [ ! -f ./public/$TITLE/rules.js ] @@ -9,8 +9,11 @@ then exit 1 fi -mkdir -p fuzzer/corpus-$TITLE +if [ -z $(npm ls -p jsfuzz) ] +then + echo Installing "jsfuzz" package. + npm install -s --no-save jsfuzz +fi -RULES=../public/$TITLE/rules.js \ - npx jazzer tools/fuzz.js --sync fuzzer/corpus-$TITLE "$@" -- -exact_artifact_path=/dev/null | \ - tee fuzzer/log-$TITLE.txt +mkdir -p fuzzer/corpus-$TITLE +npx jsfuzz tools/fuzz.js fuzzer/corpus-$TITLE --exact-artifact-path=/dev/null | tee fuzzer/log-$TITLE.txt -- cgit v1.2.3