diff options
| -rw-r--r-- | fix.m4 | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/fix.m4 b/fix.m4 index 4647d00..471b9f0 100644 --- a/fix.m4 +++ b/fix.m4 @@ -18,15 +18,16 @@ # along with taosc. If not, see <https://www.gnu.org/licenses/>. set -ex -if test $# -ne 3 +if test $# -lt 3 then - echo Usage: taosc-fix binary address workdir + echo Usage: taosc-fix binary address workdir option... exit 1 fi binary="$(realpath $1)" address="$2" wd="$(realpath $3)" bin="$wd/$(basename $binary)" +opts="${@:4}" afl-dyninst -x "$binary" "$bin.fuzzee" pushd DATA_DIR > /dev/null @@ -38,9 +39,9 @@ e9tool -M addr=$address -P 'if dest(state)@patch goto'\ # TODO: augment number of executions afl-dyninst-env afl-fuzz -i "$wd/fuzz/exploits" -o "$wd/fuzz/crashes"\ - -CE 10000 -- "$bin.fuzzee" -d @@ -find "$wd/fuzz/crashes/default/crashes" -name id:* | - parallel TAOSC_OUTPUT="$wd/vars/neg/"'$(basename {})' "$bin.collect" -d {} + -CE 10000 -- "$bin.fuzzee" $opts @@ +find "$wd/fuzz/crashes/default/crashes" -name id:* | parallel\ + TAOSC_OUTPUT="$wd/vars/neg/"'$(basename {})' "$bin.collect" $opts {} || true time taosc-synth "$wd/vars" > "$wd/predicates" taosc-scout "$binary" "$address" > "$wd/destinations" |
