diff options
| author | Dominik Maier <dmnk@google.com> | 2022-03-31 15:35:38 +0000 |
|---|---|---|
| committer | Dominik Maier <dmnk@google.com> | 2022-03-31 15:36:26 +0000 |
| commit | 285a5cb38b994b514744c49bad409a49210765d4 (patch) | |
| tree | 3c2b194865469a57ec40de886a7b0737eec799f0 /instrumentation/SanitizerCoveragePCGUARD.so.cc | |
| parent | 51dbd0e9571db5404b7c74169965367800b093db (diff) | |
| download | afl++-285a5cb38b994b514744c49bad409a49210765d4.tar.gz | |
Some scan-build fixes
Diffstat (limited to 'instrumentation/SanitizerCoveragePCGUARD.so.cc')
| -rw-r--r-- | instrumentation/SanitizerCoveragePCGUARD.so.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/instrumentation/SanitizerCoveragePCGUARD.so.cc b/instrumentation/SanitizerCoveragePCGUARD.so.cc index e234cf57..f80b1a1e 100644 --- a/instrumentation/SanitizerCoveragePCGUARD.so.cc +++ b/instrumentation/SanitizerCoveragePCGUARD.so.cc @@ -932,6 +932,15 @@ bool ModuleSanitizerCoverageAFL::InjectCoverage( IRBuilder<> IRB(callInst); + if (!FunctionGuardArray) { + + fprintf(stderr, + "SANCOV: FunctionGuardArray is NULL, failed to emit " + "instrumentation."); + continue; + + } + Value *GuardPtr = IRB.CreateIntToPtr( IRB.CreateAdd( IRB.CreatePointerCast(FunctionGuardArray, IntptrTy), @@ -957,6 +966,15 @@ bool ModuleSanitizerCoverageAFL::InjectCoverage( if (t->getTypeID() == llvm::Type::IntegerTyID) { + if (!FunctionGuardArray) { + + fprintf(stderr, + "SANCOV: FunctionGuardArray is NULL, failed to emit " + "instrumentation."); + continue; + + } + auto GuardPtr1 = IRB.CreateIntToPtr( IRB.CreateAdd( IRB.CreatePointerCast(FunctionGuardArray, IntptrTy), @@ -993,6 +1011,15 @@ bool ModuleSanitizerCoverageAFL::InjectCoverage( FixedVectorType::get(Int32PtrTy, elements); Value *x, *y; + if (!FunctionGuardArray) { + + fprintf(stderr, + "SANCOV: FunctionGuardArray is NULL, failed to emit " + "instrumentation."); + continue; + + } + Value *val1 = IRB.CreateIntToPtr( IRB.CreateAdd( IRB.CreatePointerCast(FunctionGuardArray, IntptrTy), |
