mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-10 17:21:33 +00:00
fix test-performance.sh
This commit is contained in:
parent
fd4efd04a1
commit
231420775f
3
TODO.md
3
TODO.md
@ -1,12 +1,13 @@
|
|||||||
# TODO list for AFL++
|
# TODO list for AFL++
|
||||||
|
|
||||||
## Roadmap 2.68+
|
## Roadmap 3.00+
|
||||||
|
|
||||||
- AFL_MAP_SIZE for qemu_mode and unicorn_mode
|
- AFL_MAP_SIZE for qemu_mode and unicorn_mode
|
||||||
- CPU affinity for many cores? There seems to be an issue > 96 cores
|
- CPU affinity for many cores? There seems to be an issue > 96 cores
|
||||||
- afl-plot to support multiple plot_data
|
- afl-plot to support multiple plot_data
|
||||||
- afl_custom_fuzz_splice_optin()
|
- afl_custom_fuzz_splice_optin()
|
||||||
- intel-pt tracer
|
- intel-pt tracer
|
||||||
|
- https://github.com/zyingp/desockmulti ?
|
||||||
|
|
||||||
## Further down the road
|
## Further down the road
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
# you can set the AFL_PERFORMANCE_FILE environment variable:
|
# you can set the AFL_PERFORMANCE_FILE environment variable:
|
||||||
FILE=$AFL_PERFORMANCE_FILE
|
FILE=$AFL_PERFORMANCE_FILE
|
||||||
# otherwise we use ~/.afl_performance
|
# otherwise we use ~/.afl_performance
|
||||||
test -z "$FILE" && FILE=~/.afl_performance
|
test -z "$FILE" && FILE=.afl_performance
|
||||||
|
|
||||||
test -e $FILE || {
|
test -e $FILE || {
|
||||||
echo Warning: This script measure the performance of afl++ and saves the result for future comparisons into $FILE
|
echo Warning: This script measure the performance of afl++ and saves the result for future comparisons into $FILE
|
||||||
@ -12,7 +12,11 @@ test -e $FILE || {
|
|||||||
read IN
|
read IN
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test -e ./test-performance.sh || { echo Error: this script must be run from the directory in which it lies. ; exit 1 ; }
|
||||||
|
|
||||||
export AFL_QUIET=1
|
export AFL_QUIET=1
|
||||||
|
export AFL_PATH=`pwd`/..
|
||||||
|
|
||||||
unset AFL_EXIT_WHEN_DONE
|
unset AFL_EXIT_WHEN_DONE
|
||||||
unset AFL_SKIP_CPUFREQ
|
unset AFL_SKIP_CPUFREQ
|
||||||
unset AFL_DEBUG
|
unset AFL_DEBUG
|
||||||
@ -36,8 +40,10 @@ test -e /usr/local/bin/opt && {
|
|||||||
# afl-gcc does not work there
|
# afl-gcc does not work there
|
||||||
test `uname -s` = 'Darwin' -o `uname -s` = 'FreeBSD' && {
|
test `uname -s` = 'Darwin' -o `uname -s` = 'FreeBSD' && {
|
||||||
AFL_GCC=afl-clang
|
AFL_GCC=afl-clang
|
||||||
|
CC=clang
|
||||||
} || {
|
} || {
|
||||||
AFL_GCC=afl-gcc
|
AFL_GCC=afl-gcc
|
||||||
|
CC=gcc
|
||||||
}
|
}
|
||||||
|
|
||||||
ECHO="printf %b\\n"
|
ECHO="printf %b\\n"
|
||||||
@ -57,9 +63,9 @@ RED="\\033[0;31m"
|
|||||||
YELLOW="\\033[1;93m"
|
YELLOW="\\033[1;93m"
|
||||||
RESET="\\033[0m"
|
RESET="\\033[0m"
|
||||||
|
|
||||||
MEM_LIMIT=150
|
MEM_LIMIT=500
|
||||||
|
|
||||||
>> $FILE || { echo Error: can not write to $FILE ; exit 1 ; }
|
touch $FILE || { echo Error: can not write to $FILE ; exit 1 ; }
|
||||||
|
|
||||||
echo Warning: this script is setting performance parameters with afl-system-config
|
echo Warning: this script is setting performance parameters with afl-system-config
|
||||||
sleep 1
|
sleep 1
|
||||||
@ -144,7 +150,7 @@ test -e ../afl-gcc-fast -a -e ../afl-fuzz && {
|
|||||||
$ECHO "$BLUE[*] Testing: qemu_mode"
|
$ECHO "$BLUE[*] Testing: qemu_mode"
|
||||||
QEMU=x
|
QEMU=x
|
||||||
test -e ../afl-qemu-trace -a -e ../afl-fuzz && {
|
test -e ../afl-qemu-trace -a -e ../afl-fuzz && {
|
||||||
cc -o test-instr.qemu ../test-instr.c > /dev/null 2>&1
|
$CC -o test-instr.qemu ../test-instr.c > /dev/null 2>&1
|
||||||
test -e test-instr.qemu && {
|
test -e test-instr.qemu && {
|
||||||
$ECHO "$GREEN[+] native compilation with cc succeeded"
|
$ECHO "$GREEN[+] native compilation with cc succeeded"
|
||||||
mkdir -p in
|
mkdir -p in
|
||||||
@ -157,6 +163,7 @@ test -e ../afl-qemu-trace -a -e ../afl-fuzz && {
|
|||||||
QEMU=`grep execs_done out-qemu/fuzzer_stats | awk '{print$3}'`
|
QEMU=`grep execs_done out-qemu/fuzzer_stats | awk '{print$3}'`
|
||||||
} || {
|
} || {
|
||||||
echo CUT----------------------------------------------------------------
|
echo CUT----------------------------------------------------------------
|
||||||
|
echo ../afl-fuzz -Q -V 30 -s 123 -m ${MEM_LIMIT} -i in -o out-qemu -- ./test-instr.qemu
|
||||||
cat errors
|
cat errors
|
||||||
echo CUT----------------------------------------------------------------
|
echo CUT----------------------------------------------------------------
|
||||||
$ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode"
|
$ECHO "$RED[!] afl-fuzz is not working correctly with qemu_mode"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user