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/SanitizerCoveragePCGUARD.so.cc | |
| 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/SanitizerCoveragePCGUARD.so.cc')
| -rw-r--r-- | instrumentation/SanitizerCoveragePCGUARD.so.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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)}); } |
