aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorvanhauser-thc <vh@thc.org>2024-01-25 17:00:53 +0100
committervanhauser-thc <vh@thc.org>2024-01-25 17:00:53 +0100
commit4d493452a45655073d1b7b1dfe4ad04772b3c2b8 (patch)
treea1c15bcea640643ef6103d90db969518d72a0d84 /src
parentd88c97ad2887962a8565473269057d39d75f998d (diff)
downloadafl++-4d493452a45655073d1b7b1dfe4ad04772b3c2b8.tar.gz
tmp
Diffstat (limited to 'src')
-rw-r--r--src/afl-cc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c
index 174b3783..4f6745ed 100644
--- a/src/afl-cc.c
+++ b/src/afl-cc.c
@@ -1103,12 +1103,18 @@ static void instrument_opt_mode_exclude(aflcc_state_t *aflcc) {
}
- if (aflcc->instrument_opt_mode && aflcc->compiler_mode != LLVM)
+ fprintf(stderr, "X %u %u\n", aflcc->compiler_mode, LTO);
+
+ 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.");