Skip to content

Commit

Permalink
help selective instrumentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vanhauser-thc committed Jan 18, 2024
1 parent e731a1c commit cefc9a0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions instrumentation/SanitizerCoveragePCGUARD.so.cc
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,13 @@ void ModuleSanitizerCoverageAFL::instrumentFunction(

}

if (debug) {

fprintf(stderr, "SanitizerCoveragePCGUARD: instrumenting %s in %s\n",
F.getName().str().c_str(), F.getParent()->getName().str().c_str());

}

InjectCoverage(F, BlocksToInstrument, IsLeafFunc);
// InjectTraceForCmp(F, CmpTraceTargets);
// InjectTraceForSwitch(F, SwitchTraceTargets);
Expand Down
4 changes: 2 additions & 2 deletions instrumentation/afl-llvm-common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void initInstrumentList() {

if (debug)
DEBUGF("loaded allowlist with %zu file and %zu function entries\n",
allowListFiles.size(), allowListFunctions.size());
allowListFiles.size() / 4, allowListFunctions.size() / 4);

}

Expand Down Expand Up @@ -276,7 +276,7 @@ void initInstrumentList() {

if (debug)
DEBUGF("loaded denylist with %zu file and %zu function entries\n",
denyListFiles.size(), denyListFunctions.size());
denyListFiles.size() / 4, denyListFunctions.size() / 4);

}

Expand Down

0 comments on commit cefc9a0

Please sign in to comment.