r294522 - [sancov] pc_guard_init is called at least once per DSO.

Mike Aizatsky via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 8 13:28:39 PST 2017


Author: aizatsky
Date: Wed Feb  8 15:28:39 2017
New Revision: 294522

URL: http://llvm.org/viewvc/llvm-project?rev=294522&view=rev
Log:
[sancov] pc_guard_init is called at least once per DSO.

Summary: Documentation update for https://reviews.llvm.org/D29662

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

Modified:
    cfe/trunk/docs/SanitizerCoverage.rst

Modified: cfe/trunk/docs/SanitizerCoverage.rst
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/docs/SanitizerCoverage.rst?rev=294522&r1=294521&r2=294522&view=diff
==============================================================================
--- cfe/trunk/docs/SanitizerCoverage.rst (original)
+++ cfe/trunk/docs/SanitizerCoverage.rst Wed Feb  8 15:28:39 2017
@@ -355,7 +355,8 @@ The compler will also insert a module co
 .. 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.




More information about the cfe-commits mailing list