about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2021-02-22 18:17:35 +0100
committervanhauser-thc <vh@thc.org>2021-02-22 18:17:35 +0100
commit7674dac1a16a9963e22eb628fdbd409befe19979 (patch)
treedb75438b7d6b8fdb8e86bf75e0d8e1e8f58d8d2c
parentfb2a6b6941ffb6cf575d2a772c6e0d47b49835ee (diff)
downloadafl++-7674dac1a16a9963e22eb628fdbd409befe19979.tar.gz
auto mode for CTX + NGRAM
-rw-r--r--src/afl-cc.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 5f471355..783cf23e 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1421,6 +1421,14 @@ int main(int argc, char **argv, char **envp) {
 
   }
 
+  if (instrument_opt_mode && instrument_mode == INSTRUMENT_DEFAULT &&
+      (compiler_mode == LLVM || compiler_mode == UNSET)) {
+
+    instrument_mode = INSTRUMENT_CLASSIC;
+    compiler_mode = LLVM;
+
+  }
+
   if (!compiler_mode) {
 
     // lto is not a default because outside of afl-cc RANLIB and AR have to