File tree 1 file changed +20
-0
lines changed
1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,26 @@ The *`no_builtins` [attribute]* may be applied at the crate level to disable
59
59
optimizing certain code patterns to invocations of library functions that are
60
60
assumed to exist.
61
61
62
+ ## The ` no_sanitize ` attribute
63
+
64
+ The ` no_sanitize ` attribute can be used to selectively disable sanitizer
65
+ instrumentation in an annotated function. This might be useful to: avoid
66
+ instrumentation overhead in a performance critical function, or avoid
67
+ instrumenting code that contains constructs unsupported by given sanitizer.
68
+
69
+ The precise effect of this annotation depends on particular sanitizer in use.
70
+ For example, with ` no_sanitize(thread) ` , the thread sanitizer will no longer
71
+ instrument non-atomic store / load operations, but it will instrument atomic
72
+ operations to avoid reporting false positives and provide meaning full stack
73
+ traces.
74
+
75
+ ``` rust
76
+ #[no_sanitize(address)]
77
+ fn foo () {
78
+ // ...
79
+ }
80
+ ```
81
+
62
82
## The ` target_feature ` attribute
63
83
64
84
r[ attributes.codegen.target_feature]
You can’t perform that action at this time.
0 commit comments