diff options
| author | hexcoder- <heiko@hexco.de> | 2021-02-13 13:32:42 +0100 |
|---|---|---|
| committer | hexcoder- <heiko@hexco.de> | 2021-02-13 13:32:42 +0100 |
| commit | 70651d60bdc5c70a8a699e0873a4726e1347a7c3 (patch) | |
| tree | 898468927bb1bc06ccceaa763cf44fc333ab3ccc /instrumentation | |
| parent | 385312c65858695b55607ccd376fb5ea8f83a688 (diff) | |
| parent | 87a607c7d081dac1e4afd7c3cbe5accf62d355e4 (diff) | |
| download | afl++-70651d60bdc5c70a8a699e0873a4726e1347a7c3.tar.gz | |
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'instrumentation')
| -rw-r--r-- | instrumentation/README.instrument_list.md | 2 | ||||
| -rw-r--r-- | instrumentation/SanitizerCoveragePCGUARD.so.cc | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/instrumentation/README.instrument_list.md b/instrumentation/README.instrument_list.md index 25b99074..2116d24c 100644 --- a/instrumentation/README.instrument_list.md +++ b/instrumentation/README.instrument_list.md @@ -50,7 +50,7 @@ by you, the `id` parameter is for afl-fuzz and will be overwritten. Note that useful parameters for `val` are: 1, 2, 3, 4, 8, 16, 32, 64, 128. A value of e.g. 33 will be seen as 32 for coverage purposes. -## 3) Selective instrumenation with AFL_LLVM_ALLOWLIST/AFL_LLVM_DENYLIST +## 3) Selective instrumentation with AFL_LLVM_ALLOWLIST/AFL_LLVM_DENYLIST This feature is equivalent to llvm 12 sancov feature and allows to specify on a filename and/or function name level to instrument these or skip them. diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index 5d6d6703..80c8f917 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -1088,7 +1088,7 @@ void ModuleSanitizerCoverage::InjectTraceForSwitch( } - llvm::sort(Initializers.begin() + 2, Initializers.end(), + llvm::sort(drop_begin(Initializers, 2), [](const Constant *A, const Constant *B) { return cast<ConstantInt>(A)->getLimitedValue() < @@ -1136,10 +1136,10 @@ void ModuleSanitizerCoverage::InjectTraceForGep( for (auto GEP : GepTraceTargets) { IRBuilder<> IRB(GEP); - for (auto I = GEP->idx_begin(); I != GEP->idx_end(); ++I) - if (!isa<ConstantInt>(*I) && (*I)->getType()->isIntegerTy()) - IRB.CreateCall(SanCovTraceGepFunction, - {IRB.CreateIntCast(*I, IntptrTy, true)}); + for (Use &Idx : GEP->indices()) + if (!isa<ConstantInt>(Idx) && Idx->getType()->isIntegerTy()) + IRB.CreateCall(SanCovTraceGepFunction, + {IRB.CreateIntCast(Idx, IntptrTy, true)}); } |
