about summary refs log tree commit diff
path: root/src/test/codegen
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2021-12-03 16:11:13 -0500
committerIvan Lozano <ivanlozano@google.com>2022-02-16 09:39:03 -0500
commit568aeda9e955ca2a4c043bc2ae7f854e60f6103a (patch)
tree9bf9fb4b071e057a6869945ceef6883aebf40050 /src/test/codegen
parent55697574915ca58c3fcd7b1c854c1c93e002dc85 (diff)
downloadrust-568aeda9e955ca2a4c043bc2ae7f854e60f6103a.tar.gz
rust-568aeda9e955ca2a4c043bc2ae7f854e60f6103a.zip
MemTagSanitizer Support
Adds support for the LLVM MemTagSanitizer.
Diffstat (limited to 'src/test/codegen')
-rw-r--r--src/test/codegen/sanitizer_memtag_attr_check.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/codegen/sanitizer_memtag_attr_check.rs b/src/test/codegen/sanitizer_memtag_attr_check.rs
new file mode 100644
index 00000000000..2fd362656d4
--- /dev/null
+++ b/src/test/codegen/sanitizer_memtag_attr_check.rs
@@ -0,0 +1,12 @@
+// This tests that the sanitize_memtag attribute is
+// applied when enabling the memtag sanitizer.
+//
+// needs-sanitizer-memtag
+// compile-flags: -Zsanitizer=memtag -Ctarget-feature=+mte
+
+#![crate_type = "lib"]
+
+// CHECK: ; Function Attrs:{{.*}}sanitize_memtag
+pub fn tagged() {}
+
+// CHECK: attributes #0 = {{.*}}sanitize_memtag