Skip to content

Commit 4f35e03

Browse files
committed
Remove the no_sanitize attribute in favor of sanitize
This removes the #[no_sanitize] attribute, which was behind an unstable feature named no_sanitize. Instead, we introduce the sanitize attribute which is more powerful and allows to be extended in the future (instead of just focusing on turning sanitizers off). This also makes sanitize(kernel_address = ..) attribute work with -Zsanitize=address To do it the same as how clang disables address sanitizer, we now disable ASAN on sanitize(kernel_address = "off") and KASAN on sanitize(address = "off"). The same was added to clang in https://reviews.llvm.org/D44981.
1 parent 26b9fd2 commit 4f35e03

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/sanitizers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ implementation:
4545
[marked][sanitizer-attribute] with appropriate LLVM attribute:
4646
`SanitizeAddress`, `SanitizeHWAddress`, `SanitizeMemory`, or
4747
`SanitizeThread`. By default all functions are instrumented, but this
48-
behaviour can be changed with `#[no_sanitize(...)]`.
48+
behaviour can be changed with `#[sanitize(xyz = "on|off")]`.
4949

5050
* The decision whether to perform instrumentation or not is possible only at a
5151
function granularity. In the cases were those decision differ between

0 commit comments

Comments
 (0)