about summary refs log tree commit diff
path: root/llvm_mode/afl-clang-fast.c
diff options
context:
space:
mode:
authorhexcoder- <heiko@hexco.de>2020-03-21 10:36:18 +0100
committerhexcoder- <heiko@hexco.de>2020-03-21 10:36:18 +0100
commit993bf03af90bca5e155251df271d536d5eb1d215 (patch)
tree31d3f8fecc1296b1ece35005ff9c155590243269 /llvm_mode/afl-clang-fast.c
parent2508008b53b3e3a891a3d4ba4d73d554a91e5c16 (diff)
parenta0012c9e824e4709bcc5c241424efb1821a897aa (diff)
downloadafl++-993bf03af90bca5e155251df271d536d5eb1d215.tar.gz
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r--llvm_mode/afl-clang-fast.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 313a2533..77cb1c0f 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -158,14 +158,20 @@ static void edit_params(u32 argc, char **argv) {
 #endif
     if (lto_flag[0] != '-')
       FATAL(
-          "afl-clang-lto not possible because Makefile magic did not identify "
-          "the correct -flto flag");
+          "Using afl-clang-lto is not possible because Makefile magic did not "
+          "identify the correct -flto flag");
     if (getenv("AFL_LLVM_INSTRIM") != NULL)
       FATAL("afl-clang-lto does not work with InsTrim mode");
+    if (getenv("AFL_LLVM_NGRAM_SIZE") != NULL)
+      FATAL("afl-clang-lto does not work with ngram coverage mode");
     lto_mode = 1;
 
   }
 
+  if (getenv("AFL_LLVM_NGRAM_SIZE") != NULL &&
+      getenv("AFL_LLVM_INSTRIM") != NULL)
+    FATAL("AFL_LLVM_NGRAM_SIZE and AFL_LLVM_INSTRIM can not be used together");
+
   if (!strcmp(name, "afl-clang-fast++") || !strcmp(name, "afl-clang-lto++")) {
 
     u8 *alt_cxx = getenv("AFL_CXX");
@@ -605,6 +611,7 @@ int main(int argc, char **argv, char **envp) {
             "AFL_LLVM_LAF_SPLIT_COMPARES_BITW: size limit (default 8)\n"
             "AFL_LLVM_INSTRIM: use light weight instrumentation InsTrim\n"
             "AFL_LLVM_INSTRIM_LOOPHEAD: optimize loop tracing for speed\n"
+            "AFL_LLVM_NGRAM_SIZE: use ngram prev_loc coverage\n"
             "AFL_LLVM_CMPLOG: log operands of comparisons (RedQueen mutator)\n"
             "\nafl-clang-fast was built for llvm %s with the llvm binary path "
             "of "