summaryrefslogtreecommitdiffstats
path: root/clang/docs/SanitizerCoverage.rst
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2016-09-17 05:03:05 +0000
committerKostya Serebryany <kcc@google.com>2016-09-17 05:03:05 +0000
commit8ad415574543c5ee4de98678fbe7452f60a086e3 (patch)
tree24724a9c0990542280474588c7312f070ee01d6c /clang/docs/SanitizerCoverage.rst
parent952ed8e36482cc82778acc4e51f69f7034746297 (diff)
downloadbcm5719-llvm-8ad415574543c5ee4de98678fbe7452f60a086e3.tar.gz
bcm5719-llvm-8ad415574543c5ee4de98678fbe7452f60a086e3.zip
[sanitizer-coverage] change trace-pc to use 8-byte guards
llvm-svn: 281809
Diffstat (limited to 'clang/docs/SanitizerCoverage.rst')
-rw-r--r--clang/docs/SanitizerCoverage.rst19
1 files changed, 9 insertions, 10 deletions
diff --git a/clang/docs/SanitizerCoverage.rst b/clang/docs/SanitizerCoverage.rst
index 906150014f7..a4693fe2c38 100644
--- a/clang/docs/SanitizerCoverage.rst
+++ b/clang/docs/SanitizerCoverage.rst
@@ -331,24 +331,23 @@ on every edge:
.. code-block:: none
- if (guard_variable != 0xff)
+ if (guard_variable >= 0)
__sanitizer_cov_trace_pc_guard(&guard_variable)
-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.
+Every edge will have its own 8-byte `guard_variable`.
The compler will also insert a module constructor that will call
.. code-block:: c++
- // The guard section is the address range [start, stop).
- __sanitizer_cov_trace_pc_guard_init(void *start, void *stop);
+ // The guards are [start, stop).
+ // This function may be called multiple times with the same values of start/stop.
+ __sanitizer_cov_trace_pc_guard_init(uint64_t *start, uint64_t *stop);
+
+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 functions `__sanitizer_cov_trace_pc_guard[_init]` should be defined by the user.
+The functions `__sanitizer_cov_trace_pc_*` should be defined by the user.
Tracing data flow
=================
OpenPOWER on IntegriCloud