• Home
  • Raw
  • Download

Lines Matching +full:fuzz +full:- +full:seconds

7 test -z "$FILE" && FILE=.afl_performance
9 test -e $FILE || {
11 echo Press ENTER to continue or CONTROL-C to abort
15 test -e ./test-performance.sh || { echo Error: this script must be run from the directory in which …
37 test -e /usr/local/bin/opt && {
40 # on MacOS X we prefer afl-clang over afl-gcc, because
41 # afl-gcc does not work there
42 test `uname -s` = 'Darwin' -o `uname -s` = 'FreeBSD' && {
43 AFL_GCC=afl-clang
46 AFL_GCC=afl-gcc
51 $ECHO \\101 2>&1 | grep -qE '^A' || {
53 test -e /bin/printf && {
55 $ECHO '\\101' 2>&1 | grep -qE '^A' || ECHO=
58 test -z "$ECHO" && { printf Error: printf command does not support octal character codes ; exit 1 ;…
71 echo Warning: this script is setting performance parameters with afl-system-config
73 afl-system-config > /dev/null 2>&1
81 test -e ../${AFL_GCC} -a -e ../afl-fuzz && {
82 ../${AFL_GCC} -o test-instr.plain ../test-instr.c > /dev/null 2>&1
83 test -e test-instr.plain && {
85 mkdir -p in
87 $ECHO "$GREY[*] running afl-fuzz for ${AFL_GCC} for 30 seconds"
89 ../afl-fuzz -V 30 -s 123 -m ${MEM_LIMIT} -i in -o out-gcc -- ./test-instr.plain
91 test -n "$( ls out-gcc/default/queue/id:000002* 2> /dev/null )" && {
92 GCC=`grep execs_done out-gcc/default/fuzzer_stats | awk '{print$3}'`
94 echo CUT----------------------------------------------------------------
96 echo CUT----------------------------------------------------------------
97 $ECHO "$RED[!] afl-fuzz is not working correctly with ${AFL_GCC}"
99 rm -rf in out-gcc errors test-instr.plain
101 } || $ECHO "$YELLOW[-] afl is not compiled, cannot test"
105 test -e ../afl-clang-fast -a -e ../afl-fuzz && {
106 ../afl-clang-fast -o test-instr.llvm ../test-instr.c > /dev/null 2>&1
107 test -e test-instr.llvm && {
109 mkdir -p in
111 $ECHO "$GREY[*] running afl-fuzz for llvm_mode for 30 seconds"
113 ../afl-fuzz -V 30 -s 123 -m ${MEM_LIMIT} -i in -o out-llvm -- ./test-instr.llvm
115 test -n "$( ls out-llvm/default/queue/id:000002* 2> /dev/null )" && {
116 LLVM=`grep execs_done out-llvm/default/fuzzer_stats | awk '{print$3}'`
118 echo CUT----------------------------------------------------------------
120 echo CUT----------------------------------------------------------------
121 $ECHO "$RED[!] afl-fuzz is not working correctly with llvm_mode"
123 rm -rf in out-llvm errors test-instr.llvm
125 } || $ECHO "$YELLOW[-] llvm_mode is not compiled, cannot test"
129 test -e ../afl-gcc-fast -a -e ../afl-fuzz && {
130 ../afl-gcc-fast -o test-instr.gccp ../test-instr.c > /dev/null 2>&1
131 test -e test-instr.gccp && {
133 mkdir -p in
135 $ECHO "$GREY[*] running afl-fuzz for gcc_plugin for 30 seconds"
137 ../afl-fuzz -V 30 -s 123 -m ${MEM_LIMIT} -i in -o out-gccp -- ./test-instr.gccp
139 test -n "$( ls out-gccp/default/queue/id:000002* 2> /dev/null )" && {
140 GCCP=`grep execs_done out-gccp/default/fuzzer_stats | awk '{print$3}'`
142 echo CUT----------------------------------------------------------------
144 echo CUT----------------------------------------------------------------
145 $ECHO "$RED[!] afl-fuzz is not working correctly with gcc_plugin"
147 rm -rf in out-gccp errors test-instr.gccp
149 } || $ECHO "$YELLOW[-] gcc_plugin is not compiled, cannot test"
153 test -e ../afl-qemu-trace -a -e ../afl-fuzz && {
154 $CC -o test-instr.qemu ../test-instr.c > /dev/null 2>&1
155 test -e test-instr.qemu && {
157 mkdir -p in
159 $ECHO "$GREY[*] running afl-fuzz for qemu_mode for 30 seconds"
161 ../afl-fuzz -Q -V 30 -s 123 -m ${MEM_LIMIT} -i in -o out-qemu -- ./test-instr.qemu
163 test -n "$( ls out-qemu/default/queue/id:000002* 2> /dev/null )" && {
164 QEMU=`grep execs_done out-qemu/default/fuzzer_stats | awk '{print$3}'`
166 echo CUT----------------------------------------------------------------
167 echo ../afl-fuzz -Q -V 30 -s 123 -m ${MEM_LIMIT} -i in -o out-qemu -- ./test-instr.qemu
169 echo CUT----------------------------------------------------------------
170 $ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode"
172 rm -rf in out-qemu errors test-instr.qemu
174 } || $ECHO "$YELLOW[-] qemu_mode is not compiled, cannot test"
189 test -s $FILE && {
199 test -n "$G" && LAST_GCC=$G
200 test -n "$L" && LAST_LLVM=$L
201 test -n "$P" && LAST_GCCP=$P
202 test -n "$Q" && LAST_QEMU=$Q
203 test -n "$G" -a -z "$LOW_GCC" && LOW_GCC=$G || {
204 test -n "$G" -a "$G" -lt "$LOW_GCC" 2> /dev/null && LOW_GCC=$G
206 test -n "$L" -a -z "$LOW_LLVM" && LOW_LLVM=$L || {
207 test -n "$L" -a "$L" -lt "$LOW_LLVM" 2> /dev/null && LOW_LLVM=$L
209 test -n "$P" -a -z "$LOW_GCCP" && LOW_GCCP=$P || {
210 test -n "$P" -a "$P" -lt "$LOW_GCCP" 2> /dev/null && LOW_GCCP=$P
212 test -n "$Q" -a -z "$LOW_QEMU" && LOW_QEMU=$Q || {
213 test -n "$Q" -a "$Q" -lt "$LOW_QEMU" 2> /dev/null && LOW_QEMU=$Q
215 test -n "$G" -a -z "$HIGH_GCC" && HIGH_GCC=$G || {
216 test -n "$G" -a "$G" -gt "$HIGH_GCC" 2> /dev/null && HIGH_GCC=$G
218 test -n "$L" -a -z "$HIGH_LLVM" && HIGH_LLVM=$L || {
219 test -n "$L" -a "$L" -gt "$HIGH_LLVM" 2> /dev/null && HIGH_LLVM=$L
221 test -n "$P" -a -z "$HIGH_GCCP" && HIGH_GCCP=$P || {
222 test -n "$P" -a "$P" -gt "$HIGH_GCCP" 2> /dev/null && HIGH_GCCP=$P
224 test -n "$Q" -a -z "$HIGH_QEMU" && HIGH_QEMU=$Q || {
225 test -n "$Q" -a "$Q" -gt "$HIGH_QEMU" 2> /dev/null && HIGH_QEMU=$Q
229 $ECHO "$BLUE[!] afl-cc: lowest=$LOW_GCC highest=$HIGH_GCC last=$LAST_GCC current=$GCC"
235 $ECHO "$BLUE[!] afl-gcc=$GCC llvm_mode=$LLVM gcc_plugin=$GCCP qemu_mode=$QEMU"