about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-02-03 15:08:52 +0100
committerGitHub <noreply@github.com>2024-02-03 15:08:52 +0100
commite1d7f4af35b6ac1f654aa42744a9c2e1b7b6dbb7 (patch)
tree0f6d11ee43e2dde84b2e48697faaa5acb6eecac7 /src
parentd85722a4f6329940545dd66bf16718d591fca681 (diff)
parentba3a039e457025399f7b58905d3923d068ef0eef (diff)
downloadafl++-e1d7f4af35b6ac1f654aa42744a9c2e1b7b6dbb7.tar.gz
Merge pull request #1988 from AFLplusplus/ltoctx
Ltoctx
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index e9564277..7d33b9f5 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1148,12 +1148,16 @@ static void instrument_opt_mode_exclude(aflcc_state_t *aflcc) {
 
   }
 
-  if (aflcc->instrument_opt_mode && aflcc->compiler_mode != LLVM)
+  if (aflcc->instrument_opt_mode && aflcc->compiler_mode != LLVM &&
+      !((aflcc->instrument_opt_mode & INSTRUMENT_OPT_CALLER) &&
+        aflcc->compiler_mode == LTO))
     FATAL("CTX, CALLER and NGRAM can only be used in LLVM mode");
 
   if (aflcc->instrument_opt_mode &&
       aflcc->instrument_opt_mode != INSTRUMENT_OPT_CODECOV &&
-      aflcc->instrument_mode != INSTRUMENT_CLASSIC)
+      aflcc->instrument_mode != INSTRUMENT_CLASSIC &&
+      !(aflcc->instrument_opt_mode & INSTRUMENT_OPT_CALLER &&
+        aflcc->compiler_mode == LTO))
     FATAL(
         "CALLER, CTX and NGRAM instrumentation options can only be used with "
         "the LLVM CLASSIC instrumentation mode.");