Keep getting "no instrumentation detected" error despite steps taken

1,441 views
Skip to first unread message

moveax41h

unread,
May 7, 2018, 1:03:32 PM5/7/18
to afl-users
Hi,

I get a "no instrumentation detected" error when I try to run afl-fuzz on my binary. I tried to solve this by ensuring that I was setting CC and CXX both to afl-clang for both the cmake and the make build steps. Cmake and make both successfully built the binaries when I set CC and CXX to afl-clang and afl-clang++ at the command line. I've also tried setting export AFL_SKIP_BIN_CHECK=1 as I found on another thread here in the group. After this, I still get a message saying the binary isn't instrumented. I've checked the modified dates of the output binaries as well to make sure that they were in fact being compiled by those steps and they are. Does anyone know how it would be possible that the afl-clang wrappers are still not properly instrumenting my binaries???

Thank you,
moveax41h

Brandon Perry

unread,
May 7, 2018, 1:05:25 PM5/7/18
to afl-...@googlegroups.com

On May 7, 2018, at 12:03 PM, moveax41h <tcu...@gopro.com> wrote:

Hi,

I get a "no instrumentation detected" error when I try to run afl-fuzz on my binary. I tried to solve this by ensuring that I was setting CC and CXX both to afl-clang for both the cmake and the make build steps. Cmake and make both successfully built the binaries when I set CC and CXX to afl-clang and afl-clang++ at the command line. I've also tried setting export AFL_SKIP_BIN_CHECK=1 as I found on another thread here in the group. After this, I still get a message saying the binary isn't instrumented. I've checked the modified dates of the output binaries as well to make sure that they were in fact being compiled by those steps and they are. Does anyone know how it would be possible that the afl-clang wrappers are still not properly instrumenting my binaries???

Cmake doesn’t generally respect CC or CXX environment variables. -DCMAKE_C_COMPILER and -DCMAKE_CXX_COMPILER arguments should be used.

Also make sure you are setting an appropriate -m argument on afl-fuzz. The default (50mb) may be too small.


Thank you,
moveax41h

--
You received this message because you are subscribed to the Google Groups "afl-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to afl-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

signature.asc

moveax41h

unread,
May 7, 2018, 5:51:18 PM5/7/18
to afl-users
Thank you sir! That was it... I needed to add those flags to CMAKE. Immediately, when I ran make I then saw that the instrumentation was being placed in each file and AFL now works correctly!
Reply all
Reply to author
Forward
0 new messages