afl-gcc-fast make Fail missing separator error

88 views Asked by At

when I use AFL++ to compile my project.

CC=*****/afl-gcc-fast CXX=****/afl-g++-fast make myproject

I get the error:

some.d:1 *** missing separator. Stop

And I open the some.d file:

[0;36mafl-gcc-pass [1;97m++4.08a[0m by <[email protected]>
[1;94m[*] [0mInline instrumentation at ratio of 100% in non-hardened mode.[0m
XXXX.o XXXX.d : XXXX.cpp 
...

there is a "include some.d" in makefile. but I think the some.d is create by afl-g++-fast ?

So why this happens ,and How can I fix it?thanks

My demo project works well(build by alf++ ,run well), but when I build real project, I got this error.

1

There are 1 answers

0
ddr On

the root cause is: the AFL++ will print some data like

 "[0;36mafl-gcc-pass [1;97m++4.08a[0m by <[email protected]>"

in the screen, and the makefile script use -MM then use the output redirect to the next script by "|". at last ,the .d have the extra tag.

Fix:

I use the -MM -MF to genetate a temp file then redirect the temp file for next step. the error has fix.

thanks Botje's answer.