From: Mike Aizatsky Date: Wed, 8 Feb 2017 21:28:39 +0000 (+0000) Subject: [sancov] pc_guard_init is called at least once per DSO. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e8490267b8e279ab3c2fe5780dfe7f0c54f1b107;p=clang [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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294522 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/docs/SanitizerCoverage.rst b/docs/SanitizerCoverage.rst index 8ec6871d79..8ff5bdf3a3 100644 --- a/docs/SanitizerCoverage.rst +++ b/docs/SanitizerCoverage.rst @@ -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 // 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.