@@ -9,17 +9,17 @@ The tracking issues for this feature are:
9
9
10
10
This feature allows for use of one of following sanitizers:
11
11
12
- * [ AddressSanitizer] [ clang-asan ] a fast memory error detector.
13
- * [ ControlFlowIntegrity] [ clang-cfi ] LLVM Control Flow Integrity (CFI) provides
12
+ * [ AddressSanitizer] ( #addresssanitizer ) a fast memory error detector.
13
+ * [ ControlFlowIntegrity] ( #controlflowintegrity ) LLVM Control Flow Integrity (CFI) provides
14
14
forward-edge control flow protection.
15
- * [ HWAddressSanitizer] [ clang-hwasan ] a memory error detector similar to
15
+ * [ HWAddressSanitizer] ( #hwaddresssanitizer ) a memory error detector similar to
16
16
AddressSanitizer, but based on partial hardware assistance.
17
- * [ LeakSanitizer] [ clang-lsan ] a run-time memory leak detector.
18
- * [ MemorySanitizer] [ clang-msan ] a detector of uninitialized reads.
19
- * [ MemTagSanitizer] [ clang-memtag ] fast memory error detector based on
17
+ * [ LeakSanitizer] ( #leaksanitizer ) a run-time memory leak detector.
18
+ * [ MemorySanitizer] ( #memorysanitizer ) a detector of uninitialized reads.
19
+ * [ MemTagSanitizer] ( #memtagsanitizer ) fast memory error detector based on
20
20
Armv8.5-A Memory Tagging Extension.
21
- * [ ShadowCallStack] [ clang-scs ] provides backward-edge control flow protection.
22
- * [ ThreadSanitizer] [ clang-tsan ] a fast data race detector.
21
+ * [ ShadowCallStack] ( #shadowcallstack ) provides backward-edge control flow protection.
22
+ * [ ThreadSanitizer] ( #threadsanitizer ) a fast data race detector.
23
23
24
24
To enable a sanitizer compile with ` -Zsanitizer=address ` ,` -Zsanitizer=cfi ` ,
25
25
` -Zsanitizer=hwaddress ` , ` -Zsanitizer=leak ` , ` -Zsanitizer=memory ` ,
@@ -58,6 +58,8 @@ AddressSanitizer works with non-instrumented code although it will impede its
58
58
ability to detect some bugs. It is not expected to produce false positive
59
59
reports.
60
60
61
+ See the [ Clang AddressSanitizer documentation] [ clang-asan ] for more details.
62
+
61
63
## Examples
62
64
63
65
Stack buffer overflow:
@@ -204,6 +206,8 @@ tracking issue [#89653](https://github.com/rust-lang/rust/issues/89653)).
204
206
205
207
LLVM CFI can be enabled with -Zsanitizer= cfi and requires LTO (i.e., -Clto).
206
208
209
+ See the [Clang ControlFlowIntegrity documentation][clang-cfi] for more details.
210
+
207
211
# # Example
208
212
209
213
` ` ` text
@@ -430,6 +434,8 @@ HWAddressSanitizer requires `tagged-globals` target feature to instrument
430
434
globals. To enable this target feature compile with ` -C
431
435
target-feature=+tagged-globals`
432
436
437
+ See the [Clang HWAddressSanitizer documentation][clang-hwasan] for more details.
438
+
433
439
# # Example
434
440
435
441
Heap buffer overflow:
@@ -507,6 +513,8 @@ LeakSanitizer is supported on the following targets:
507
513
* ` x86_64-apple-darwin`
508
514
* ` x86_64-unknown-linux-gnu`
509
515
516
+ See the [Clang LeakSanitizer documentation][clang-lsan] for more details.
517
+
510
518
# MemorySanitizer
511
519
512
520
MemorySanitizer is detector of uninitialized reads.
@@ -521,6 +529,8 @@ MemorySanitizer requires all program code to be instrumented. C/C++ dependencies
521
529
need to be recompiled using Clang with ` -fsanitize= memory` option. Failing to
522
530
achieve that will result in false positive reports.
523
531
532
+ See the [Clang MemorySanitizer documentation][clang-msan] for more details.
533
+
524
534
# # Example
525
535
526
536
Detecting the use of uninitialized memory. The ` -Zbuild-std` flag rebuilds and
@@ -569,7 +579,7 @@ MemTagSanitizer is supported on the following targets:
569
579
MemTagSanitizer requires hardware support and the ` mte` target feature.
570
580
To enable this target feature compile with ` -C target-feature= " +mte" ` .
571
581
572
- More information can be found in the associated [LLVM documentation](https:// llvm.org/docs/MemTagSanitizer.html) .
582
+ See the [LLVM MemTagSanitizer documentation][ llvm-memtag] for more details .
573
583
574
584
# ShadowCallStack
575
585
@@ -581,7 +591,9 @@ ShadowCallStack can be enabled with `-Zsanitizer=shadow-call-stack` option and i
581
591
582
592
* `aarch64-linux-android`
583
593
584
- A runtime must be provided by the application or operating system. See the [LLVM documentation][clang-scs] for further details.
594
+ A runtime must be provided by the application or operating system.
595
+
596
+ See the [Clang ShadowCallStack documentation][clang-scs] for more details.
585
597
586
598
# ThreadSanitizer
587
599
@@ -604,6 +616,8 @@ can lead to false positive reports.
604
616
ThreadSanitizer does not support atomic fences `std::sync::atomic::fence`,
605
617
nor synchronization performed using inline assembly code.
606
618
619
+ See the [Clang ThreadSanitizer documentation][clang-tsan] for more details.
620
+
607
621
## Example
608
622
609
623
```rust
@@ -673,6 +687,7 @@ Sanitizers produce symbolized stacktraces when llvm-symbolizer binary is in `PAT
673
687
* [HWAddressSanitizer in Clang][clang-hwasan]
674
688
* [LeakSanitizer in Clang][clang-lsan]
675
689
* [MemorySanitizer in Clang][clang-msan]
690
+ * [MemTagSanitizer in LLVM][llvm-memtag]
676
691
* [ThreadSanitizer in Clang][clang-tsan]
677
692
678
693
[clang-asan]: https://clang.llvm.org/docs/AddressSanitizer.html
@@ -682,3 +697,4 @@ Sanitizers produce symbolized stacktraces when llvm-symbolizer binary is in `PAT
682
697
[clang-msan]: https://clang.llvm.org/docs/MemorySanitizer.html
683
698
[clang-scs]: https://clang.llvm.org/docs/ShadowCallStack.html
684
699
[clang-tsan]: https://clang.llvm.org/docs/ThreadSanitizer.html
700
+ [llvm-memtag]: https://llvm.org/docs/MemTagSanitizer.html
0 commit comments