diff options
author | van Hauser <vh@thc.org> | 2021-02-26 09:45:43 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-26 09:45:43 +0100 |
commit | 78d96c4dc86ac20e2a6e244017407ccc037ff13b (patch) | |
tree | e277f092c27714f75e0c19f9ac8ab18dbfd1745a /test/test-qemu-mode.sh | |
parent | 7ae7b0f3732cfd9d82cf9403818012d00faa07c3 (diff) | |
parent | ee0ca07f3c9f7c5971440f5dca70a2ee6f37584d (diff) | |
download | afl++-78d96c4dc86ac20e2a6e244017407ccc037ff13b.tar.gz |
Merge pull request #759 from AFLplusplus/dev
push to stable
Diffstat (limited to 'test/test-qemu-mode.sh')
-rwxr-xr-x | test/test-qemu-mode.sh | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/test/test-qemu-mode.sh b/test/test-qemu-mode.sh index 0cd6ef40..85578d55 100755 --- a/test/test-qemu-mode.sh +++ b/test/test-qemu-mode.sh @@ -39,14 +39,7 @@ test -e ../afl-qemu-trace && { $ECHO "$GREY[*] running afl-fuzz for qemu_mode AFL_ENTRYPOINT, this will take approx 6 seconds" { { - if file test-instr | grep -q "32-bit"; then - # for 32-bit reduce 8 nibbles to the lower 7 nibbles - ADDR_LOWER_PART=`nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.//'` - else - # for 64-bit reduce 16 nibbles to the lower 9 nibbles - ADDR_LOWER_PART=`nm test-instr | grep "T main" | awk '{print $1}' | sed 's/^.......//'` - fi - export AFL_ENTRYPOINT=`expr 0x4${ADDR_LOWER_PART}` + export AFL_ENTRYPOINT=`printf 1 | AFL_DEBUG=1 ../afl-qemu-trace ./test-instr 2>&1 >/dev/null | awk '/forkserver/{print $4; exit}'` $ECHO AFL_ENTRYPOINT=$AFL_ENTRYPOINT - $(nm test-instr | grep "T main") - $(file ./test-instr) ../afl-fuzz -m ${MEM_LIMIT} -V2 -Q -i in -o out -- ./test-instr unset AFL_ENTRYPOINT |