about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-11-19 16:25:50 +0100
committervanhauser-thc <vh@thc.org>2024-11-19 16:25:50 +0100
commit82752fe38db590184f7f1725954f906da397d91c (patch)
tree82bce83b6e6f08f96f513824ffd3c2f478e43f02
parentd11ade56e223185f53629a6e2f1096c7098c3e8d (diff)
downloadafl++-dev.tar.gz
code format dev
-rw-r--r--instrumentation/SanitizerCoveragePCGUARD.so.cc4
-rw-r--r--instrumentation/afl-llvm-common.h6
-rw-r--r--src/afl-fuzz-init.c6
3 files changed, 11 insertions, 5 deletions
diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc
index 859b4e7b..0919ba35 100644
--- a/instrumentation/SanitizerCoveragePCGUARD.so.cc
+++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc
@@ -23,6 +23,10 @@
   #include "llvm/IR/CFG.h"
 #endif
 #include "llvm/IR/Constant.h"
+#if LLVM_VERSION_MAJOR >= 20
+  #include "llvm/IR/Constants.h"
+  #include "llvm/IR/ValueSymbolTable.h"
+#endif
 #include "llvm/IR/DataLayout.h"
 #if LLVM_VERSION_MAJOR < 15
   #include "llvm/IR/DebugInfo.h"
diff --git a/instrumentation/afl-llvm-common.h b/instrumentation/afl-llvm-common.h
index 98c4c7c9..434476c4 100644
--- a/instrumentation/afl-llvm-common.h
+++ b/instrumentation/afl-llvm-common.h
@@ -10,9 +10,9 @@
 #include <fstream>
 
 #ifdef __has_include
-#if __has_include(<optional>)
-#include <optional>
-#endif
+  #if __has_include(<optional>)
+    #include <optional>
+  #endif
 #endif
 
 #include <sys/time.h>
diff --git a/src/afl-fuzz-init.c b/src/afl-fuzz-init.c
index af6e6d4c..adf38adc 100644
--- a/src/afl-fuzz-init.c
+++ b/src/afl-fuzz-init.c
@@ -1717,12 +1717,14 @@ static u8 delete_files(u8 *path, u8 *prefix) {
     if ((d_ent->d_name[0] != '.' &&
          (!prefix || !strncmp(d_ent->d_name, prefix, strlen(prefix))))
         /* heiko: don't forget the SHA1 files */
-        || strspn(d_ent->d_name, "0123456789abcdef") == 2 * 20 /* TODO use 2 * HASH_LENGTH */
-       ) {
+        || strspn(d_ent->d_name, "0123456789abcdef") ==
+               2 * 20                           /* TODO use 2 * HASH_LENGTH */
+    ) {
 
       u8 *fname = alloc_printf("%s/%s", path, d_ent->d_name);
       if (unlink(fname)) { PFATAL("Unable to delete '%s'", fname); }
       ck_free(fname);
+
     }
 
   }