diff options
author | vanhauser-thc <vh@thc.org> | 2024-02-08 15:28:19 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2024-02-08 15:28:19 +0100 |
commit | 88e41f01c839ed5c46882222ad7e1f5c3e7d9e20 (patch) | |
tree | abd961e605e603a3fc38f7bc7110e8120422a4c5 | |
parent | 369fce9c85bf3b850a7109e4604fee71f694d2cb (diff) | |
download | afl++-88e41f01c839ed5c46882222ad7e1f5c3e7d9e20.tar.gz |
env fix
-rw-r--r-- | instrumentation/SanitizerCoverageLTO.so.cc | 10 | ||||
-rw-r--r-- | src/afl-cc.c | 2 |
2 files changed, 10 insertions, 2 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index b93b72bf..f55aeca2 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -456,9 +456,17 @@ bool ModuleSanitizerCoverageLTO::instrumentModule( if ((isatty(2) && !getenv("AFL_QUIET")) || debug) { + char buf[64] = {}; + if (instrument_ctx) { + + snprintf(buf, sizeof(buf), " (CTX mode, depth %u)\n", + instrument_ctx_max_depth); + + } + SAYF(cCYA "afl-llvm-lto" VERSION cRST "%s by Marc \"vanHauser\" Heuse <mh@mh-sec.de>\n", - instrument_ctx ? " (CTX mode)" : ""); + buf); } else { diff --git a/src/afl-cc.c b/src/afl-cc.c index 4d586ce8..3a32a0d1 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -828,7 +828,7 @@ static void instrument_mode_old_environ(aflcc_state_t *aflcc) { } if (getenv("AFL_LLVM_CTX")) aflcc->instrument_opt_mode |= INSTRUMENT_OPT_CTX; - if (getenv("AFL_LLVM_CALLER")) + if (getenv("AFL_LLVM_CALLER") || getenv("AFL_LLVM_LTO_CALLER") || getenv("AFL_LLVM_LTO_CTX")) aflcc->instrument_opt_mode |= INSTRUMENT_OPT_CALLER; if (getenv("AFL_LLVM_NGRAM_SIZE")) { |