summaryrefslogtreecommitdiff
path: root/testing/run_afl.sh
blob: c7a3bbc6d0f27d2c7b319f1081ce4e98bc9fff44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#! /bin/sh

# move to repo root
cd ../
rm -R _afl_build
mkdir _afl_build
cd _afl_build

# build c-toxcore using afl instrumentation
cmake -DCMAKE_C_COMPILER=afl-clang -DBUILD_MISC_TESTS=ON ..
make

# start fuzzing
afl-fuzz -i ../testing/afl_testdata/tox_saves/ -o afl_out/ ./afl_toxsave @@