diff options
author | van Hauser <vh@thc.org> | 2021-03-24 18:19:45 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-24 18:19:45 +0100 |
commit | c2b58cff6fa7d6af766cc6f686046d7e043a3977 (patch) | |
tree | 0c04cd932d129b45e31fd17c328844295677ca5f /instrumentation/afl-llvm-common.cc | |
parent | 958436be4ba057e8409787e7ff4ddcfa095c46da (diff) | |
parent | 6e2a0ef233fc09e8751e2d4cba3298610d8bed2c (diff) | |
download | afl++-c2b58cff6fa7d6af766cc6f686046d7e043a3977.tar.gz |
Merge pull request #843 from AFLplusplus/tmp
Tmp
Diffstat (limited to 'instrumentation/afl-llvm-common.cc')
-rw-r--r-- | instrumentation/afl-llvm-common.cc | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/instrumentation/afl-llvm-common.cc b/instrumentation/afl-llvm-common.cc index a27c4069..74943fb2 100644 --- a/instrumentation/afl-llvm-common.cc +++ b/instrumentation/afl-llvm-common.cc @@ -60,20 +60,25 @@ bool isIgnoreFunction(const llvm::Function *F) { "asan.", "llvm.", "sancov.", - "__ubsan_", + "__ubsan", "ign.", - "__afl_", + "__afl", "_fini", - "__libc_csu", + "__libc_", "__asan", "__msan", "__cmplog", "__sancov", + "__san", + "__cxx_", + "__decide_deferred", + "_GLOBAL", + "_ZZN6__asan", + "_ZZN6__lsan", "msan.", "LLVMFuzzerM", "LLVMFuzzerC", "LLVMFuzzerI", - "__decide_deferred", "maybe_duplicate_stderr", "discard_output", "close_stdout", @@ -89,6 +94,20 @@ bool isIgnoreFunction(const llvm::Function *F) { } + static const char *ignoreSubstringList[] = { + + "__asan", "__msan", "__ubsan", "__lsan", + "__san", "__sanitize", "__cxx", "_GLOBAL__", + "DebugCounter", "DwarfDebug", "DebugLoc" + + }; + + for (auto const &ignoreListFunc : ignoreSubstringList) { + + if (F->getName().contains(ignoreListFunc)) { return true; } + + } + return false; } @@ -351,7 +370,7 @@ static std::string getSourceName(llvm::Function *F) { if (cDILoc) { instFilename = cDILoc->getFilename(); } - if (instFilename.str().empty()) { + if (instFilename.str().empty() && cDILoc) { /* If the original location is empty, try using the inlined location */ |