aboutsummaryrefslogtreecommitdiff
path: root/instrumentation
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-12-21 11:02:09 +0100
committerGitHub <noreply@github.com>2020-12-21 11:02:09 +0100
commit6d1f17d78dec7947a18174918af0703310af015e (patch)
tree4145bc58d29c59159a1be5049d6ff4beea46afee /instrumentation
parentbc9f956c84dacdf34e7cfaf8fc6552b1ae4b8417 (diff)
parentc28ecbbb2b35cc0fd9eac267ea4db33d891d9e59 (diff)
downloadAFLplusplus-6d1f17d78dec7947a18174918af0703310af015e.tar.gz
Merge branch 'dev' into skim_romu
Diffstat (limited to 'instrumentation')
-rw-r--r--instrumentation/README.llvm.md21
-rw-r--r--instrumentation/afl-gcc-pass.so.cc6
-rw-r--r--instrumentation/afl-llvm-common.cc6
3 files changed, 9 insertions, 24 deletions
diff --git a/instrumentation/README.llvm.md b/instrumentation/README.llvm.md
index 07636970..2705ce0d 100644
--- a/instrumentation/README.llvm.md
+++ b/instrumentation/README.llvm.md
@@ -168,26 +168,7 @@ This is the most powerful and effective fuzzing you can do.
Please see [README.persistent_mode.md](README.persistent_mode.md) for a
full explanation.
-## 7) Bonus feature: 'trace-pc-guard' mode
-
-LLVM is shipping with a built-in execution tracing feature
-that provides AFL with the necessary tracing data without the need to
-post-process the assembly or install any compiler plugins. See:
-
- http://clang.llvm.org/docs/SanitizerCoverage.html#tracing-pcs-with-guards
-
-If you have not an outdated compiler and want to give it a try, build
-targets this way:
-
-```
-AFL_LLVM_INSTRUMENT=PCGUARD make
-```
-
-Note that this is currently the default if you use LLVM >= 7, as it is the best
-mode. Recommended is LLVM >= 9.
-If you have llvm 11+ and compiled afl-clang-lto - this is the only better mode.
-
-## 8) Bonus feature: 'dict2file' pass
+## 7) Bonus feature: 'dict2file' pass
Just specify `AFL_LLVM_DICT2FILE=/absolute/path/file.txt` and during compilation
all constant string compare parameters will be written to this file to be
diff --git a/instrumentation/afl-gcc-pass.so.cc b/instrumentation/afl-gcc-pass.so.cc
index c95ead8f..25437609 100644
--- a/instrumentation/afl-gcc-pass.so.cc
+++ b/instrumentation/afl-gcc-pass.so.cc
@@ -622,10 +622,11 @@ struct afl_pass : gimple_opt_pass {
allowListFiles.push_back(line);
else
allowListFunctions.push_back(line);
- getline(fileStream, line);
}
+ getline(fileStream, line);
+
}
if (debug)
@@ -696,10 +697,11 @@ struct afl_pass : gimple_opt_pass {
denyListFiles.push_back(line);
else
denyListFunctions.push_back(line);
- getline(fileStream, line);
}
+ getline(fileStream, line);
+
}
if (debug)
diff --git a/instrumentation/afl-llvm-common.cc b/instrumentation/afl-llvm-common.cc
index 557939fd..a27c4069 100644
--- a/instrumentation/afl-llvm-common.cc
+++ b/instrumentation/afl-llvm-common.cc
@@ -168,10 +168,11 @@ void initInstrumentList() {
allowListFiles.push_back(line);
else
allowListFunctions.push_back(line);
- getline(fileStream, line);
}
+ getline(fileStream, line);
+
}
if (debug)
@@ -242,10 +243,11 @@ void initInstrumentList() {
denyListFiles.push_back(line);
else
denyListFunctions.push_back(line);
- getline(fileStream, line);
}
+ getline(fileStream, line);
+
}
if (debug)