about summary refs log tree commit diff
path: root/llvm_mode/afl-clang-fast.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-05-05 15:37:02 +0200
committervan Hauser <vh@thc.org>2020-05-05 15:37:02 +0200
commitd6346561dbe2a00472eda76e8a1276b77e0f67a7 (patch)
treed440ae93147c96ce75c447ce9c918a71ac9e60ae /llvm_mode/afl-clang-fast.c
parentd82ada89fee37068b0ff44f340338af3fc07cc37 (diff)
downloadafl++-d6346561dbe2a00472eda76e8a1276b77e0f67a7.tar.gz
ctx+ngram for instrim
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r--llvm_mode/afl-clang-fast.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 9f85e5c6..4b9999a6 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -720,23 +720,17 @@ int main(int argc, char **argv, char **envp) {
         "(requires LLVM 11)");
 #endif
 
-  if (instrument_opt_mode && instrument_mode != INSTRUMENT_CLASSIC)
-    /*&& instrument_mode != INSTRUMENT_CFG*/
+  if (instrument_opt_mode && instrument_mode != INSTRUMENT_CLASSIC &&
+      instrument_mode != INSTRUMENT_CFG)
     FATAL(
-        "CTX and NGRAM instrumentation options can only be used with the "
-        "CLASSIC instrumentation mode!");
+        "CTX and NGRAM instrumentation options can only be used with CFG "
+        "(recommended) and CLASSIC instrumentation modes!");
 
   if (getenv("AFL_LLVM_SKIP_NEVERZERO") && getenv("AFL_LLVM_NOT_ZERO"))
     FATAL(
         "AFL_LLVM_NOT_ZERO and AFL_LLVM_SKIP_NEVERZERO can not be set "
         "together");
 
-  if (instrument_mode == INSTRUMENT_CFG &&
-      getenv("AFL_LLVM_INSTRIM_SKIPSINGLEBLOCK") == NULL && ngram_size)
-    FATAL(
-        "NGRAM option together with CFG/INSTRIM instrumentation mode can only "
-        "be used if AFL_LLVM_INSTRIM_SKIPSINGLEBLOCK is set");
-
   if (argc < 2 || strcmp(argv[1], "-h") == 0) {
 
     if (instrument_mode != INSTRUMENT_LTO)