@@ -12,6 +12,7 @@ This feature allows for use of one of following sanitizers:
12
12
* [ AddressSanitizer] ( #addresssanitizer ) a fast memory error detector.
13
13
* [ ControlFlowIntegrity] ( #controlflowintegrity ) LLVM Control Flow Integrity (CFI) provides
14
14
forward-edge control flow protection.
15
+ * [ DataFlowSanitizer] ( #dataflowsanitizer ) a generic dynamic data flow analysis framework.
15
16
* [ HWAddressSanitizer] ( #hwaddresssanitizer ) a memory error detector similar to
16
17
AddressSanitizer, but based on partial hardware assistance.
17
18
* [ KernelControlFlowIntegrity] ( #kernelcontrolflowintegrity ) LLVM Kernel Control
@@ -25,14 +26,21 @@ This feature allows for use of one of following sanitizers:
25
26
* [ ShadowCallStack] ( #shadowcallstack ) provides backward-edge control flow protection (aarch64 only).
26
27
* [ ThreadSanitizer] ( #threadsanitizer ) a fast data race detector.
27
28
28
- To enable a sanitizer compile with ` -Zsanitizer=address ` ,` -Zsanitizer=cfi ` ,
29
- ` -Zsanitizer=hwaddress ` , ` -Zsanitizer=leak ` , ` -Zsanitizer=memory ` ,
30
- ` -Zsanitizer=memtag ` , ` -Zsanitizer=shadow-call-stack ` , or ` -Zsanitizer=thread ` .
31
- You might also need the ` --target ` and ` build-std ` flags. Example:
29
+ To enable a sanitizer compile with ` -Zsanitizer=address ` , ` -Zsanitizer=cfi ` ,
30
+ ` -Zsanitizer=dataflow ` ,` -Zsanitizer=hwaddress ` , ` -Zsanitizer=leak ` ,
31
+ ` -Zsanitizer=memory ` , ` -Zsanitizer=memtag ` , ` -Zsanitizer=shadow-call-stack ` , or
32
+ ` -Zsanitizer=thread ` . You might also need the ` --target ` and ` build-std ` flags.
33
+
34
+ Example:
32
35
``` shell
33
36
$ RUSTFLAGS=-Zsanitizer=address cargo build -Zbuild-std --target x86_64-unknown-linux-gnu
34
37
```
35
38
39
+ Additional options for sanitizers can be passed to LLVM command line argument
40
+ processor via LLVM arguments using ` llvm-args ` codegen option (e.g.,
41
+ ` -Cllvm-args=-dfsan-combine-pointer-labels-on-load=false ` ). See the sanitizer
42
+ documentation for more information about additional options.
43
+
36
44
# AddressSanitizer
37
45
38
46
AddressSanitizer is a memory error detector. It can detect the following types
@@ -625,6 +633,21 @@ LLVM KCFI is supported on the following targets:
625
633
See the [Clang KernelControlFlowIntegrity documentation][clang-kcfi] for more
626
634
details.
627
635
636
+ # DataFlowSanitizer
637
+
638
+ DataFlowSanitizer is a generalised dynamic data flow analysis.
639
+
640
+ Unlike other Sanitizer tools, this tool is not designed to detect a specific
641
+ class of bugs on its own. Instead, it provides a generic dynamic data flow
642
+ analysis framework to be used by clients to help detect application-specific
643
+ issues within their own code.
644
+
645
+ DataFlowSanitizer is supported on the following targets:
646
+
647
+ * ` x86_64-unknown-linux-gnu`
648
+
649
+ See the [Clang DataFlowSanitizer documentation][clang-dataflow] for more details.
650
+
628
651
# KernelAddressSanitizer
629
652
630
653
KernelAddressSanitizer (KASAN) is a freestanding version of AddressSanitizer
@@ -835,6 +858,7 @@ Sanitizers produce symbolized stacktraces when llvm-symbolizer binary is in `PAT
835
858
* [Sanitizers project page](https://github.com/google/sanitizers/wiki/)
836
859
* [AddressSanitizer in Clang][clang-asan]
837
860
* [ControlFlowIntegrity in Clang][clang-cfi]
861
+ * [DataFlowSanitizer in Clang][clang-dataflow]
838
862
* [HWAddressSanitizer in Clang][clang-hwasan]
839
863
* [Linux Kernel' s KernelAddressSanitizer documentation][linux-kasan]
840
864
* [LeakSanitizer in Clang][clang-lsan]
@@ -844,6 +868,7 @@ Sanitizers produce symbolized stacktraces when llvm-symbolizer binary is in `PAT
844
868
845
869
[clang-asan]: https://clang.llvm.org/docs/AddressSanitizer.html
846
870
[clang-cfi]: https://clang.llvm.org/docs/ControlFlowIntegrity.html
871
+ [clang-dataflow]: https://clang.llvm.org/docs/DataFlowSanitizer.html
847
872
[clang-hwasan]: https://clang.llvm.org/docs/HardwareAssistedAddressSanitizerDesign.html
848
873
[clang-kcfi]: https://clang.llvm.org/docs/ControlFlowIntegrity.html#fsanitize-kcfi
849
874
[clang-lsan]: https://clang.llvm.org/docs/LeakSanitizer.html
0 commit comments