[PATCH] D37156: [SanitizeCoverage] Enable stack-depth coverage for -fsanitize=fuzzer

Kostya Serebryany via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 11:49:14 PDT 2017


kcc added a comment.

Did you check this on something other than the unit tests? 
E.g. a couple of benchmarks from fuzzer-test-suite?



================
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:177
 
+bool IsLeafFunc(const Function &F) {
+  for (const BasicBlock &BB : F.getBasicBlockList())
----------------
we already have a linear scan in SanitizerCoverageModule::runOnFunction -- don't introduce a second one. 
Also, there is InvokeInst in addition to CallInst, see the loop in runOnFunction.

You can simply extend the loop in runOnFunction to set a flag if the function has non-intrin calls/ invokes 


https://reviews.llvm.org/D37156





More information about the cfe-commits mailing list