aboutsummaryrefslogtreecommitdiff
path: root/llvm_mode
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-06-30 16:52:48 +0200
committervan Hauser <vh@thc.org>2020-06-30 16:52:48 +0200
commit878b27af762b9d79d46c3de59ced749bb0e93d35 (patch)
tree95ef3d7647420d81bd9eab723e0c81170794c5cf /llvm_mode
parent4b99ebbf22fa7a9d4fe43056c641e71af04133be (diff)
downloadafl++-878b27af762b9d79d46c3de59ced749bb0e93d35.tar.gz
blacklist -> ignore renaming
Diffstat (limited to 'llvm_mode')
-rw-r--r--llvm_mode/afl-llvm-common.cc14
-rw-r--r--llvm_mode/afl-llvm-common.h2
-rw-r--r--llvm_mode/afl-llvm-lto-instrim.so.cc2
-rw-r--r--llvm_mode/afl-llvm-lto-instrumentation.so.cc2
-rw-r--r--llvm_mode/afl-llvm-lto-whitelist.so.cc2
5 files changed, 11 insertions, 11 deletions
diff --git a/llvm_mode/afl-llvm-common.cc b/llvm_mode/afl-llvm-common.cc
index 6c7222cd..5a75c4dd 100644
--- a/llvm_mode/afl-llvm-common.cc
+++ b/llvm_mode/afl-llvm-common.cc
@@ -44,13 +44,13 @@ char *getBBName(const llvm::BasicBlock *BB) {
}
/* Function that we never instrument or analyze */
-/* Note: this blacklist check is also called in isInWhitelist() */
-bool isBlacklisted(const llvm::Function *F) {
+/* Note: this ignore check is also called in isInWhitelist() */
+bool isIgnoreFunction(const llvm::Function *F) {
// Starting from "LLVMFuzzer" these are functions used in libfuzzer based
// fuzzing campaign installations, e.g. oss-fuzz
- static const char *Blacklist[] = {
+ static const char *ignoreList[] = {
"asan.",
"llvm.",
@@ -73,9 +73,9 @@ bool isBlacklisted(const llvm::Function *F) {
};
- for (auto const &BlacklistFunc : Blacklist) {
+ for (auto const &ignoreListFunc : ignoreList) {
- if (F->getName().startswith(BlacklistFunc)) { return true; }
+ if (F->getName().startswith(ignoreListFunc)) { return true; }
}
@@ -107,8 +107,8 @@ void initWhitelist() {
bool isInWhitelist(llvm::Function *F) {
// is this a function with code? If it is external we dont instrument it
- // anyway and cant be in the whitelist. Or if it is blacklisted.
- if (!F->size() || isBlacklisted(F)) return false;
+ // anyway and cant be in the whitelist. Or if it is ignored.
+ if (!F->size() || isIgnoreFunction(F)) return false;
// if we do not have a whitelist return true
if (myWhitelist.empty()) return true;
diff --git a/llvm_mode/afl-llvm-common.h b/llvm_mode/afl-llvm-common.h
index 50ad3abc..db009f8f 100644
--- a/llvm_mode/afl-llvm-common.h
+++ b/llvm_mode/afl-llvm-common.h
@@ -33,7 +33,7 @@ typedef long double max_align_t;
#endif
char * getBBName(const llvm::BasicBlock *BB);
-bool isBlacklisted(const llvm::Function *F);
+bool isIgnoreFunction(const llvm::Function *F);
void initWhitelist();
bool isInWhitelist(llvm::Function *F);
unsigned long long int calculateCollisions(uint32_t edges);
diff --git a/llvm_mode/afl-llvm-lto-instrim.so.cc b/llvm_mode/afl-llvm-lto-instrim.so.cc
index 4b89c9d0..b62912a6 100644
--- a/llvm_mode/afl-llvm-lto-instrim.so.cc
+++ b/llvm_mode/afl-llvm-lto-instrim.so.cc
@@ -562,7 +562,7 @@ struct InsTrimLTO : public ModulePass {
// if the function below our minimum size skip it (1 or 2)
if (F.size() < function_minimum_size) continue;
- if (isBlacklisted(&F)) continue;
+ if (isIgnoreFunction(&F)) continue;
functions++;
diff --git a/llvm_mode/afl-llvm-lto-instrumentation.so.cc b/llvm_mode/afl-llvm-lto-instrumentation.so.cc
index 0d3015d7..82af890c 100644
--- a/llvm_mode/afl-llvm-lto-instrumentation.so.cc
+++ b/llvm_mode/afl-llvm-lto-instrumentation.so.cc
@@ -196,7 +196,7 @@ bool AFLLTOPass::runOnModule(Module &M) {
// fprintf(stderr, "DEBUG: Function %s\n", F.getName().str().c_str());
if (F.size() < function_minimum_size) continue;
- if (isBlacklisted(&F)) continue;
+ if (isIgnoreFunction(&F)) continue;
// whitelist check
AttributeList Attrs = F.getAttributes();
diff --git a/llvm_mode/afl-llvm-lto-whitelist.so.cc b/llvm_mode/afl-llvm-lto-whitelist.so.cc
index b1f791f4..52c7cf0d 100644
--- a/llvm_mode/afl-llvm-lto-whitelist.so.cc
+++ b/llvm_mode/afl-llvm-lto-whitelist.so.cc
@@ -126,7 +126,7 @@ bool AFLwhitelist::runOnModule(Module &M) {
if (F.size() < 1) continue;
// fprintf(stderr, "F:%s\n", F.getName().str().c_str());
- if (isBlacklisted(&F)) continue;
+ if (isIgnoreFunction(&F)) continue;
BasicBlock::iterator IP = F.getEntryBlock().getFirstInsertionPt();
IRBuilder<> IRB(&(*IP));