]> granicus.if.org Git - llvm/commit
[SanitizerCoverage] Add stack depth tracing instrumentation.
authorMatt Morehouse <mascasa@google.com>
Fri, 18 Aug 2017 18:43:30 +0000 (18:43 +0000)
committerMatt Morehouse <mascasa@google.com>
Fri, 18 Aug 2017 18:43:30 +0000 (18:43 +0000)
commit6dcfafe8ab4e5fcceb0606a288146fddf1300d83
tree4cc1784389db4d8849d0431942acc35878576667
parent0b33df9bb6bcdf562dd55d939fe5aba4201e57b7
[SanitizerCoverage] Add stack depth tracing instrumentation.

Summary:
Augment SanitizerCoverage to insert maximum stack depth tracing for
use by libFuzzer.  The new instrumentation is enabled by the flag
-fsanitize-coverage=stack-depth and is compatible with the existing
trace-pc-guard coverage.  The user must also declare the following
global variable in their code:
  thread_local uintptr_t __sancov_lowest_stack

https://bugs.llvm.org/show_bug.cgi?id=33857

Reviewers: vitalybuka, kcc

Reviewed By: vitalybuka

Subscribers: kubamracek, hiraditya, cfe-commits, llvm-commits

Differential Revision: https://reviews.llvm.org/D36839

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@311186 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Instrumentation.h
lib/Fuzzer/FuzzerTracePC.cpp
lib/Fuzzer/FuzzerTracePC.h
lib/Transforms/Instrumentation/SanitizerCoverage.cpp
test/Instrumentation/SanitizerCoverage/stack-depth.ll [new file with mode: 0644]