diff options
author | van Hauser <vh@thc.org> | 2023-02-23 11:49:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-23 11:49:28 +0100 |
commit | eb5c1ee4f3ffd6e42a3637082ab4ea089052ad8b (patch) | |
tree | b0ebfc066252a9c78dfe90cf811b2b27f43cc215 /instrumentation/SanitizerCoverageLTO.so.cc | |
parent | a293281b9bbb4e61bfbe5e67ab108d9e5ee40192 (diff) | |
parent | eeccb2da69d7e6f32ee74c431e7c5053e8379dff (diff) | |
download | afl++-eb5c1ee4f3ffd6e42a3637082ab4ea089052ad8b.tar.gz |
Merge pull request #1650 from AFLplusplus/autotoken
Autotoken
Diffstat (limited to 'instrumentation/SanitizerCoverageLTO.so.cc')
-rw-r--r-- | instrumentation/SanitizerCoverageLTO.so.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/instrumentation/SanitizerCoverageLTO.so.cc b/instrumentation/SanitizerCoverageLTO.so.cc index 231151f5..f82224ed 100644 --- a/instrumentation/SanitizerCoverageLTO.so.cc +++ b/instrumentation/SanitizerCoverageLTO.so.cc @@ -236,6 +236,7 @@ class ModuleSanitizerCoverageLTO // const SpecialCaseList * Allowlist; // const SpecialCaseList * Blocklist; uint32_t autodictionary = 1; + uint32_t autodictionary_no_main = 0; uint32_t inst = 0; uint32_t afl_global_id = 0; uint32_t unhandled = 0; @@ -411,7 +412,8 @@ bool ModuleSanitizerCoverageLTO::instrumentModule( /* Show a banner */ setvbuf(stdout, NULL, _IONBF, 0); - if (getenv("AFL_DEBUG")) debug = 1; + if (getenv("AFL_DEBUG")) { debug = 1; } + if (getenv("AFL_LLVM_DICT2FILE_NO_MAIN")) { autodictionary_no_main = 1; } if ((isatty(2) && !getenv("AFL_QUIET")) || debug) { @@ -503,6 +505,13 @@ bool ModuleSanitizerCoverageLTO::instrumentModule( if (!isInInstrumentList(&F, MNAME) || !F.size()) { continue; } + if (autodictionary_no_main && + (!F.getName().compare("main") || !F.getName().compare("_main"))) { + + continue; + + } + for (auto &BB : F) { for (auto &IN : BB) { |