sanitizers: Implement support for the sanitize ignorelist - #157808
sanitizers: Implement support for the sanitize ignorelist#1578081c3t3a wants to merge 4 commits into
Conversation
|
Some changes occurred in tests/codegen-llvm/sanitizer cc @rcvalle |
This comment has been minimized.
This comment has been minimized.
739335b to
624834b
Compare
The sanitize ignorelist gives central controls over which functions, files, etc. should be ignored and not sanitized. It is a common file format for clang and explained here: https://clang.llvm.org/docs/SanitizerSpecialCaseList.html. This change adds support for this list in Rust as well.
624834b to
693e22f
Compare
|
☔ The latest upstream changes (presumably #158593) made this pull request unmergeable. Please resolve the merge conflicts by rebasing. |
| } | ||
| } | ||
|
|
||
| pub(crate) fn type_name_for_ignore_list<'tcx>( |
There was a problem hiding this comment.
Can this be moved to the rustc_sanitizers crate? Maybe an ignorelist module there? Are there any other things that could be moved there?
| @@ -0,0 +1,22 @@ | |||
| //@ needs-sanitizer-cfi | |||
There was a problem hiding this comment.
Can we move these tests to sanitizer/ignorelist/?
| RustString::build_byte_buffer(f) | ||
| } | ||
|
|
||
| pub(crate) struct SanitizerIgnoreList { |
There was a problem hiding this comment.
Can this be moved to the rustc_sanitizers crate? Maybe an ignorelist module there? Are there any other things that could be moved there?
| } else { | ||
| // Do not set sanitizer attributes for naked functions. | ||
| to_add.extend(sanitize_attrs(cx, tcx, codegen_fn_attrs.sanitizers)); | ||
| let mut enabled = tcx.sess.sanitizers() - codegen_fn_attrs.sanitizers.disabled; |
There was a problem hiding this comment.
Should this (or parts of this) made into a function and moved to the rustc_sanitizers crate? Maybe an ignorelist module there? Are there any other things that could be moved there?
The sanitize ignorelist gives central controls over which functions, files, etc. should be ignored and not sanitized. It is a common file format for clang and explained here:
https://clang.llvm.org/docs/SanitizerSpecialCaseList.html. This change adds support for this list in Rust as well.
r? @rcvalle