about summary refs log tree commit diff
diff options
context:
space:
mode:
-rwxr-xr-xtest/test.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test.sh b/test/test.sh
index 0b367032..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 && {
     {
@@ -563,13 +563,13 @@ test -e ../afl-qemu-trace && {
       }
       rm -f errors
 
-$ECHO "debug: $SYS"
       test "$SYS" = "i686" -o "$SYS" = "x86_64" -o "$SYS" = "amd64" && {
         $ECHO "$GREY[*] running afl-fuzz for persistent qemu_mode, this will take approx 10 seconds"
         {
           export AFL_QEMU_PERSISTENT_ADDR=`expr 0x4$(nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.......//')`
           export AFL_QEMU_PERSISTENT_GPR=1
-$ECHO "debug: AFL_QEMU_PERSISTENT_ADDR=$AFL_QEMU_PERSISTENT_ADDR"
+          $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 )" && {