Failed to use afl-clang-fast
GenoWang opened this issue · comments
There's no afl-clang-fast
or afl-clang-fast++
after run the compile.sh:
pushd fuzz/afl
make clean
make CC=clang-6.0
#pushd llvm_mode
#make clean
#make CC=clang-6.0 CXX=g++
#popd
popd
afl-analyze afl-fuzz.c afl-tmin experimental QuickStartGuide.txt
afl-analyze.c afl-g++ afl-tmin.c hash.h README
afl-as afl-gcc alloc-inl.h init README-JS.md
afl-as.c afl-gcc.c as libdislocator run
afl-as.h afl-gotcpu config.h libtokencap test-instr.c
afl-clang afl-gotcpu.c debug.h llvm_mode types.h
afl-clang++ afl-showmap dictionaries Makefile
afl-fuzz afl-showmap.c docs qemu_mode
when I tried to compile them by myself I got that two binary but failed with afl-llvm-pass.so
$ make LLVM_CONFIG=llvm-config-6.0 CC=clang-6.0 CXX=g++
[*] Checking for working 'llvm-config'...
[*] Checking for working 'clang-6.0'...
[*] Checking for '../afl-showmap'...
[+] All set and ready to build.
g++ `llvm-config-6.0 --cxxflags` -fno-rtti -fpic -O3 -funroll-loops -Wall -D_FORTIFY_SOURCE=2 -g -Wno-pointer-sign -DVERSION=\"2.52b\" -Wno-variadic-macros -shared afl-llvm-pass.so.cc -o ../afl-llvm-pass.so `llvm-config-6.0 --ldflags`
cc1plus: error: -Werror=date-time: no option -Wdate-time
cc1plus: warning: command line option ‘-Wno-pointer-sign’ is valid for C/ObjC but not for C++ [enabled by default]
Makefile:83: recipe for target '../afl-llvm-pass.so' failed
make: *** [../afl-llvm-pass.so] Error 1
When try to Instrument v8:
[-] PROGRAM ABORT : Unable to find 'afl-llvm-rt.o' or 'afl-llvm-pass.so'. Please set AFL_PATH
Location : find_obj(), afl-clang-fast.c:90
fixed with the following line in the llvm_mode/Makefile
CLANG_CFL = `$(LLVM_CONFIG) --cxxflags` -Wl,-znodelete -fno-rtti -fpic $(CXXFLAGS)
But still failed when instrument v8
// [...]
error: unknown warning option '-Wno-psabi' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wno-builtin-assume-aligned-alignment' [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wno-deprecated-copy'; did you mean '-Wno-deprecated'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wno-non-c-typedef-for-linkage'; did you mean '-Wno-return-type-c-linkage'? [-Werror,-Wunknown-warning-option]
error: unknown warning option '-Wmax-tokens'; did you mean '-Wextra-tokens'? [-Werror,-Wunknown-warning-option]
clang (LLVM option parsing): Unknown command line argument '-enable-dse-memoryssa=false'. Try: 'clang (LLVM option parsing) -help'
clang (LLVM option parsing): Did you mean '-verify-memoryssa=false'?
ninja: build stopped: subcommand failed.