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

Matt Morehouse via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 25 15:49:53 PDT 2017


morehouse updated this revision to Diff 112756.
morehouse added a comment.

- Add weak reference in SanitizerCoverage.cpp


https://reviews.llvm.org/D37156

Files:
  llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp


Index: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
===================================================================
--- llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
+++ llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp
@@ -78,6 +78,9 @@
 
 static const char *const SanCovLowestStackName = "__sancov_lowest_stack";
 
+__attribute__((tls_model("initial-exec")))
+thread_local uintptr_t __sancov_lowest_stack;
+
 static cl::opt<int> ClCoverageLevel(
     "sanitizer-coverage-level",
     cl::desc("Sanitizer Coverage. 0: none, 1: entry block, 2: all blocks, "


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37156.112756.patch
Type: text/x-patch
Size: 595 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170825/52e832d0/attachment.bin>


More information about the cfe-commits mailing list