about summary refs log tree commit diff
path: root/test/test.sh
diff options
context:
space:
mode:
authorAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-03 12:46:01 +0100
committerAndrea Fioraldi <andreafioraldi@gmail.com>2020-02-03 12:46:01 +0100
commit63fe2977dab3b4fadd919b75e2fb1eb36aa48f20 (patch)
treefdcc3d44da89207a8def5b250604cb8edae0f8f5 /test/test.sh
parentde2771d1266c14e90eeeed581847eb1f1f63c6cf (diff)
parent37bdda0464fd14a8cd8a0fbdf68a55c8440b1017 (diff)
downloadafl++-63fe2977dab3b4fadd919b75e2fb1eb36aa48f20.tar.gz
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'test/test.sh')
-rwxr-xr-xtest/test.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/test.sh b/test/test.sh
index 507685db..20e02a83 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -519,7 +519,7 @@ test -e ../libradamsa.so && {
 
 $ECHO "$BLUE[*] Testing: qemu_mode"
 test -e ../afl-qemu-trace && {
-  gcc -o test-instr ../test-instr.c
+  gcc -pie -fPIE -o test-instr ../test-instr.c
   gcc -o test-compcov test-compcov.c
   test -e test-instr -a -e test-compcov && {
     {
@@ -568,7 +568,9 @@ test -e ../afl-qemu-trace && {
         {
           export AFL_QEMU_PERSISTENT_ADDR=`expr 0x4$(nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.......//')`
           export AFL_QEMU_PERSISTENT_GPR=1
-          ../afl-fuzz -V10 -Q -i in -o out -- ./test-instr > /dev/null 2>&1
+          $ECHO "Info: AFL_QEMU_PERSISTENT_ADDR=$AFL_QEMU_PERSISTENT_ADDR <= $(nm test-instr | grep "T main" | awk '{print $1}')"
+          file test-instr
+          ../afl-fuzz -V10 -Q -i in -o out -- ./test-instr
         } >>errors 2>&1
         test -n "$( ls out/queue/id:000002* 2> /dev/null )" && {
           $ECHO "$GREEN[+] afl-fuzz is working correctly with persistent qemu_mode"