about summary refs log tree commit diff
path: root/tests/codegen-llvm/sanitizer
AgeCommit message (Collapse)AuthorLines
2025-08-21-Zsanitize and -Zsanitizer-cfi-normalize-integers flags are now target ↵Andrew Zhogin-35/+35
modifiers with custom consistency check function
2025-08-18Remove the no_sanitize attribute in favor of sanitizeBastian Kersting-29/+81
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.
2025-08-18Implement the #[sanitize(..)] attributeBastian Kersting-0/+118
This change implements the #[sanitize(..)] attribute, which opts to replace the currently unstable #[no_sanitize]. Essentially the new attribute works similar as #[no_sanitize], just with more flexible options regarding where it is applied. E.g. it is possible to turn a certain sanitizer either on or off: `#[sanitize(address = "on|off")]` This attribute now also applies to more places, e.g. it is possible to turn off a sanitizer for an entire module or impl block: ```rust \#[sanitize(address = "off")] mod foo { fn unsanitized(..) {} #[sanitize(address = "on")] fn sanitized(..) {} } \#[sanitize(thread = "off")] impl MyTrait for () { ... } ``` This attribute is enabled behind the unstable `sanitize` feature.
2025-08-07Prevent name collisions with internal implementation detailsbjorn3-1/+1
The implementation of the linkage attribute inside extern blocks defines symbols starting with _rust_extern_with_linkage_. If someone tries to also define this symbol you will get a symbol conflict or even an ICE. By adding an unpredictable component to the symbol name, this becomes less of an issue.
2025-07-29Verify llvm-needs-components are not empty and match the --target valueDaniel Paoliello-11/+11
2025-07-22Rename `tests/codegen` into `tests/codegen-llvm`Guillaume Gomez-0/+2203