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-04-15 22:27:32 +0200
committerhexcoder- <heiko@hexco.de>2020-04-15 22:27:32 +0200
commit7e2c52f2b90c544981341248a13b64174b889b7a (patch)
treecd5f631c8a243e88837afba14b094e1077b394d8 /llvm_mode/afl-clang-fast.c
parent21f696f02e2e17e66e8f275b2de333a4871e1863 (diff)
downloadafl++-7e2c52f2b90c544981341248a13b64174b889b7a.tar.gz
disable compare-transform-pass when lto_mode and autodictionary is used.
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r--llvm_mode/afl-clang-fast.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c
index 57d7b89a..082e307a 100644
--- a/llvm_mode/afl-clang-fast.c
+++ b/llvm_mode/afl-clang-fast.c
@@ -223,8 +223,10 @@ static void edit_params(u32 argc, char **argv, char **envp) {
 
   }
 
-  if (getenv("LAF_TRANSFORM_COMPARES") ||
-      getenv("AFL_LLVM_LAF_TRANSFORM_COMPARES")) {
+  if (!getenv("AFL_LLVM_LTO_AUTODICTIONARY") // disabled when autodictionary
+    && instrument_mode != INSTRUMENT_LTO     // and lto_mode is used
+    && (getenv("LAF_TRANSFORM_COMPARES") ||
+        getenv("AFL_LLVM_LAF_TRANSFORM_COMPARES"))) {
 
     cc_params[cc_par_cnt++] = "-Xclang";
     cc_params[cc_par_cnt++] = "-load";