From: Kostya Serebryany Date: Thu, 15 Sep 2016 22:11:08 +0000 (+0000) Subject: [sanitizer-coverage] make trace-pc-guard and indirect-call work together X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e57451ad5c2045349fc6a466f06a7931deb92df5;p=clang [sanitizer-coverage] make trace-pc-guard and indirect-call work together git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@281665 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/SanitizerCoverage.rst b/docs/SanitizerCoverage.rst index e4d85679f7..906150014f 100644 --- a/docs/SanitizerCoverage.rst +++ b/docs/SanitizerCoverage.rst @@ -323,8 +323,8 @@ and can be used with `AFL `__. Tracing PCs with guards ======================= -Another *experimental* feature that tries to combine `trace-pc`, -`8bit-counters` and boolean coverage +Another *experimental* feature that tries to combine the functionality of `trace-pc`, +`8bit-counters` and boolean coverage. With ``-fsanitize-coverage=trace-pc-guard`` the compiler will insert the following code on every edge: @@ -338,6 +338,9 @@ Every edge will have its own 1-byte `guard_variable`. All such guard variables will reside in a dedicated section (i.e. they essentially form an array). +Similarly to `trace-pc,indirect-calls`, with `trace-pc-guards,indirect-calls` +``__sanitizer_cov_trace_pc_indirect(void *callee)`` will be inserted on every indirect call. + The compler will also insert a module constructor that will call .. code-block:: c++