[llvm-branch-commits] [compiler-rt] [NFC][sanitizer] Commit test for #106912 (PR #108289)

Vitaly Buka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Sep 11 13:49:39 PDT 2024


https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/108289

>From a5e15941239fae2b006c7a0509fa278238fb1c8e Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Wed, 11 Sep 2024 13:46:26 -0700
Subject: [PATCH 1/2] more sanitizers

Created using spr 1.3.4
---
 .../TestCases/dlsym_alloc.cpp                 | 22 ++++++++++++++-----
 1 file changed, 17 insertions(+), 5 deletions(-)

diff --git a/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp b/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp
index 9d61a30d22c1bf..1806e57525f3de 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp
@@ -25,23 +25,35 @@ extern "C" const char *__asan_default_options()
     __attribute__((disable_sanitizer_instrumentation)) {
   return test();
 }
-
+extern "C" const char *__hwasan_default_options()
+    __attribute__((disable_sanitizer_instrumentation)) {
+  return test();
+}
 extern "C" const char *__lsan_default_options()
     __attribute__((disable_sanitizer_instrumentation)) {
   return test();
 }
-
+extern "C" const char *__memprof_default_options()
+    __attribute__((disable_sanitizer_instrumentation)) {
+  return test();
+}
 extern "C" const char *__msan_default_options()
     __attribute__((disable_sanitizer_instrumentation)) {
   return test();
 }
-
+extern "C" const char *__nsan_default_options()
+    __attribute__((disable_sanitizer_instrumentation)) {
+  return test();
+}
+extern "C" const char *__rtsan_default_options()
+    __attribute__((disable_sanitizer_instrumentation)) {
+  return test();
+}
 extern "C" const char *__tsan_default_options()
     __attribute__((disable_sanitizer_instrumentation)) {
   return test();
 }
-
-extern "C" const char *__hwasan_default_options()
+extern "C" const char *__ubsan_default_options()
     __attribute__((disable_sanitizer_instrumentation)) {
   return test();
 }

>From fa0db86ba64d5e8639eff73f6eaf60cf52e109e9 Mon Sep 17 00:00:00 2001
From: Vitaly Buka <vitalybuka at google.com>
Date: Wed, 11 Sep 2024 13:49:28 -0700
Subject: [PATCH 2/2] format

Created using spr 1.3.4
---
 compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp b/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp
index 1806e57525f3de..ea4685b37316e6 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp
+++ b/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.cpp
@@ -9,7 +9,7 @@
 #include <stdlib.h>
 
 const char *test() __attribute__((disable_sanitizer_instrumentation)) {
-  void * volatile p = malloc(3);
+  void *volatile p = malloc(3);
   p = realloc(p, 7);
   free(p);
 



More information about the llvm-branch-commits mailing list