[compiler-rt] [sanitizer-common][rtsan] Add rtsan to sanitizer-common suites (PR #217094)
Chris Apple via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 11:07:54 PDT 2026
https://github.com/cjappl created https://github.com/llvm/llvm-project/pull/217094
Final change in a set of changes cleaning up `rtsan` for inclusion into the sanitizer-common test suites.
Fixes one final test and enables the option.
>From 6440a68c4bfabd355d6845aef2475ed59c3e87a1 Mon Sep 17 00:00:00 2001
From: Chris Apple <cja-private at pm.me>
Date: Fri, 31 Jul 2026 16:45:41 -0700
Subject: [PATCH] [sanitizer-common][rtsan] Add rtsan to sanitizer-common
suites
---
compiler-rt/test/sanitizer_common/CMakeLists.txt | 2 +-
.../test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/test/sanitizer_common/CMakeLists.txt b/compiler-rt/test/sanitizer_common/CMakeLists.txt
index 739879d961248..31de8228faa8d 100644
--- a/compiler-rt/test/sanitizer_common/CMakeLists.txt
+++ b/compiler-rt/test/sanitizer_common/CMakeLists.txt
@@ -7,7 +7,7 @@ set(SANITIZER_COMMON_TESTSUITES)
# FIXME(dliew): We should switch to COMPILER_RT_SANITIZERS_TO_BUILD instead of
# the hard coded `SUPPORTED_TOOLS_INIT` list once we know that the other
# sanitizers work.
-set(SUPPORTED_TOOLS_INIT asan lsan hwasan msan tsan ubsan)
+set(SUPPORTED_TOOLS_INIT asan lsan hwasan msan tsan ubsan rtsan)
set(SUPPORTED_TOOLS)
foreach(SANITIZER_TOOL ${SUPPORTED_TOOLS_INIT})
string(TOUPPER ${SANITIZER_TOOL} SANITIZER_TOOL_UPPER)
diff --git a/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp b/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp
index f94bd51ed9e04..4bca815c433fd 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/Darwin/abort_on_error.cpp
@@ -14,12 +14,12 @@
int global;
-int main() {
+int main() [[clang::nonblocking]] {
#if defined(USING_ubsan)
volatile int *null = 0;
*null = 0;
#else
- volatile int *a = new int[100];
+ volatile int *a = new int[100]; // allocation triggers RTSan report
delete[] a;
global = a[0]; // use-after-free: triggers ASan/TSan report.
#endif
More information about the llvm-commits
mailing list