about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2023-10-24 12:00:54 +0200
committervanhauser-thc <vh@thc.org>2023-10-24 12:00:54 +0200
commitb22eef4736944bf1010172efa087ef94d1822802 (patch)
treef40365711b94eef738c4f99f879935e5035a2100
parentf7fab7915550196366e47204d882886671d5bbf9 (diff)
downloadafl++-b22eef4736944bf1010172efa087ef94d1822802.tar.gz
fix
-rw-r--r--instrumentation/afl-llvm-dict2file.so.cc11
1 files changed, 10 insertions, 1 deletions
diff --git a/instrumentation/afl-llvm-dict2file.so.cc b/instrumentation/afl-llvm-dict2file.so.cc
index 36d939d9..59b16ca0 100644
--- a/instrumentation/afl-llvm-dict2file.so.cc
+++ b/instrumentation/afl-llvm-dict2file.so.cc
@@ -206,7 +206,16 @@ bool AFLdict2filePass::runOnModule(Module &M) {
 
   ptr = getenv("AFL_LLVM_DICT2FILE");
 
-  if (!ptr) { return false; }
+  if (!ptr) {
+
+#if LLVM_VERSION_MAJOR >= 11                        /* use new pass manager */
+    auto PA = PreservedAnalyses::all();
+    return PA;
+#else
+    return true;
+#endif
+
+  }
 
   if (*ptr != '/')
     FATAL("AFL_LLVM_DICT2FILE is not set to an absolute path: %s", ptr);