reactivated LTO persistent mode to test.sh
MODIFY
llvm_mode/afl-clang-fast.c
llvm_mode/afl-clang-fast.c
@@ -610,7 +610,8 @@ int main(int argc, char** argv, char** envp) {
callname, BIN_PATH, BIN_PATH, LLVM_VERSION, LLVM_BINDIR);
if (strcmp(callname, "afl-clang-lto") == 0)
- SAYF("Compiled with linker target \"%s\" and LTO flags \"%s\"\n\n"
+ SAYF(
+ "Compiled with linker target \"%s\" and LTO flags \"%s\"\n\n"
"If anything fails - be sure to read README.lto.md!\n\n",
AFL_REAL_LD, AFL_CLANG_FLTO);

MODIFY
test/test.sh
test/test.sh
@@ -423,7 +423,7 @@ test -e ../afl-clang-lto -a -e ../afl-llvm-lto-instrumentation.so && {
}
rm -f test-instr.plain
-# Disabled whitelist and persistent until I have a different solution -mh
+# Disabled whitelist until I have a different solution -mh
# echo foobar.c > whitelist.txt
# AFL_LLVM_WHITELIST=whitelist.txt ../afl-clang-lto -o test-compcov test-compcov.c > test.out 2>&1
# test -e test-compcov && {
@@ -438,19 +438,19 @@ test -e ../afl-clang-lto -a -e ../afl-llvm-lto-instrumentation.so && {
# CODE=1
# }
# rm -f test-compcov test.out whitelist.txt
-# ../afl-clang-lto -o test-persistent ../experimental/persistent_demo/persistent_demo.c > /dev/null 2>&1
-# test -e test-persistent && {
-# echo foo | ../afl-showmap -o /dev/null -q -r ./test-persistent && {
-# $ECHO "$GREEN[+] llvm_mode LTO persistent mode feature works correctly"
-# } || {
-# $ECHO "$RED[!] llvm_mode LTO persistent mode feature failed to work"
-# CODE=1
-# }
-# } || {
-# $ECHO "$RED[!] llvm_mode LTO persistent mode feature compilation failed"
-# CODE=1
-# }
-# rm -f test-persistent
+ ../afl-clang-lto -o test-persistent ../examples/persistent_demo/persistent_demo.c > /dev/null 2>&1
+ test -e test-persistent && {
+ echo foo | ../afl-showmap -o /dev/null -q -r ./test-persistent && {
+ $ECHO "$GREEN[+] llvm_mode LTO persistent mode feature works correctly"
+ } || {
+ $ECHO "$RED[!] llvm_mode LTO persistent mode feature failed to work"
+ CODE=1
+ }
+ } || {
+ $ECHO "$RED[!] llvm_mode LTO persistent mode feature compilation failed"
+ CODE=1
+ }
+ rm -f test-persistent
} || {
$ECHO "$YELLOW[-] LTO llvm_mode not compiled, cannot test"
INCOMPLETE=1

reactivated LTO persistent mode to test.sh