emptyiscolor / Profile-guided-Fuzzing

Profile-guided System Optimizations for Accelerated Greybox Fuzzing
7 stars 0 forks source link

error #4

Open west-snow opened 2 months ago

west-snow commented 2 months ago

Hello, when I execute the make command in llvm_mode, I get the following error: /home/sm/Desktop/Profile-guided-Fuzzing-main (1)/Profile-guided-Fuzzing-main/AFL/llvm_mode/afl-llvm-rt.o.c:288: undefined reference to __real__exit' /home/sm/Desktop/Profile-guided-Fuzzing-main (1)/Profile-guided-Fuzzing-main/AFL/llvm_mode/afl-llvm-rt.o.c:289: undefined reference torealexit' clang: error: linker command failed with exit code 1 (use -v to see invocation) Do you know how to solve this issue?

emptyiscolor commented 4 days ago

It should be fine to see the errors below because of make test_build. It does not affect the building of the AFL LLVM pass itself.

/usr/bin/ld: ./Profile-guided-Fuzzing/AFL/llvm_mode/afl-llvm-rt.o.c:289: undefined reference to `__real__exit'
clang-9: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:100: test_build] Error 1

And you can also try build AFL llvm_mode with

cd llvm_mode && make ||  LDFLAGS="-Wl,-wrap,_exit -Wl,-wrap,exit -Wl,-wrap,_Exit" make test_build
west-snow commented 3 days ago

Thank you for your reply. The previous issue has been resolved, but now a new problem has arisen. When I execute CC=afl-clang-fast ./configure --disable-shared, it shows 'No such file or directory' for './configure'.

emptyiscolor commented 3 days ago

Please try to comment out this line to disable the migrated snapshot mode, and rebuild the AFL with make clean; make && make -C llvm_mode && make install. It should work well with the official binutils project for ./configure

(you may uncomment the other macros corresponding to different modes like AFL_RT_VAR_REC later to enable variable recovery mode)

Or use Docker :

cd AFL
docker build . -t aflfs-base:latest -f Dockerfile.AFL

Then refer to the steps from the document for Docker builds.