]> granicus.if.org Git - clang/commitdiff
[sancov] pc_guard_init is called at least once per DSO.
authorMike Aizatsky <aizatsky@chromium.org>
Wed, 8 Feb 2017 21:28:39 +0000 (21:28 +0000)
committerMike Aizatsky <aizatsky@chromium.org>
Wed, 8 Feb 2017 21:28:39 +0000 (21:28 +0000)
Summary: Documentation update for https://reviews.llvm.org/D29662

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

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294522 91177308-0d34-0410-b5e6-96231b3b80d8

docs/SanitizerCoverage.rst

index 8ec6871d79599cd1736f12cb404a1f7bb8f28d86..8ff5bdf3a3d2643f5faa99a47131de2a7e5f169b 100644 (file)
@@ -355,7 +355,8 @@ The compler will also insert a module constructor that will call
 .. code-block:: c++
 
    // The guards are [start, stop).
-   // This function may be called multiple times with the same values of start/stop.
+   // This function will be called at least once per DSO and may be called
+   // more than once with the same values of start/stop.
    __sanitizer_cov_trace_pc_guard_init(uint32_t *start, uint32_t *stop);
 
 With `trace-pc-guards,indirect-calls`
@@ -373,10 +374,10 @@ Example:
   #include <sanitizer/coverage_interface.h>
 
   // This callback is inserted by the compiler as a module constructor
-  // into every compilation unit. 'start' and 'stop' correspond to the
+  // into every DSO. 'start' and 'stop' correspond to the
   // beginning and end of the section with the guards for the entire
-  // binary (executable or DSO) and so it will be called multiple times
-  // with the same parameters.
+  // binary (executable or DSO). The callback will be called at least
+  // once per DSO and may be called multiple times with the same parameters.
   extern "C" void __sanitizer_cov_trace_pc_guard_init(uint32_t *start,
                                                       uint32_t *stop) {
     static uint64_t N;  // Counter for the guards.