]> granicus.if.org Git - clang/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)
commitb2b075cecbf00cc6cb9a4ba3055d5404e1994e16
tree479b9bae47703cf77f3ebd0507e9a33c24dcf466
parentea3d2bfb45fcdf01672ad827d949e99257242924
[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/cfe/trunk@311186 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/CC1Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/Driver/SanitizerArgs.cpp
lib/Frontend/CompilerInvocation.cpp
test/Driver/fsanitize-coverage.c