This is an automated email from the ASF dual-hosted git repository.

zanmato pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow.git


The following commit(s) were added to refs/heads/main by this push:
     new f57c37a621 GH-45206: [C++][CMake] Add sanitizer presets (#45207)
f57c37a621 is described below

commit f57c37a62194f28fdfdcafd3a42845b60173dbe4
Author: Rossi Sun <[email protected]>
AuthorDate: Thu Jan 9 14:01:35 2025 +0800

    GH-45206: [C++][CMake] Add sanitizer presets (#45207)
    
    
    
    ### Rationale for this change
    
    See #45206
    
    ### What changes are included in this PR?
    
    Add base presets for ASAN/TSAN/UBSAN. And cross product such base presets 
by `ninja-debug` which is, IMO, the config just enough necessary and likely to 
need sanitizers' aid.
    
    ### Are these changes tested?
    
    No need.
    
    ### Are there any user-facing changes?
    
    None.
    
    * GitHub Issue: #45206
    
    Authored-by: Rossi Sun <[email protected]>
    Signed-off-by: Rossi Sun <[email protected]>
---
 cpp/CMakePresets.json | 62 ++++++++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 59 insertions(+), 3 deletions(-)

diff --git a/cpp/CMakePresets.json b/cpp/CMakePresets.json
index 2fb7b2044f..ee8fc1248b 100644
--- a/cpp/CMakePresets.json
+++ b/cpp/CMakePresets.json
@@ -232,6 +232,33 @@
         "ARROW_TEST_MEMCHECK": "ON"
       }
     },
+    {
+      "name": "sanitizer-asan",
+      "hidden": true,
+      "cacheVariables": {
+        "ARROW_USE_ASAN": "ON",
+        "ARROW_JEMALLOC": "OFF",
+        "ARROW_MIMALLOC": "OFF"
+      }
+    },
+    {
+      "name": "sanitizer-tsan",
+      "hidden": true,
+      "cacheVariables": {
+        "ARROW_USE_TSAN": "ON",
+        "ARROW_JEMALLOC": "OFF",
+        "ARROW_MIMALLOC": "OFF"
+      }
+    },
+    {
+      "name": "sanitizer-ubsan",
+      "hidden": true,
+      "cacheVariables": {
+        "ARROW_USE_UBSAN": "ON",
+        "ARROW_JEMALLOC": "OFF",
+        "ARROW_MIMALLOC": "OFF"
+      }
+    },
     {
       "name": "ninja-debug-minimal",
       "inherits": [
@@ -527,16 +554,45 @@
       "displayName": "Benchmarking build with everything enabled",
       "cacheVariables": {}
     },
+    {
+      "name": "ninja-debug-asan",
+      "inherits": [
+        "ninja-debug",
+        "sanitizer-asan"
+      ],
+      "displayName": "Debug ASAN build with tests and more optional 
components",
+      "cacheVariables": {}
+    },
+    {
+      "name": "ninja-debug-tsan",
+      "inherits": [
+        "ninja-debug",
+        "sanitizer-tsan"
+      ],
+      "displayName": "Debug TSAN build with tests and more optional 
components",
+      "cacheVariables": {}
+    },
+    {
+      "name": "ninja-debug-ubsan",
+      "inherits": [
+        "ninja-debug",
+        "sanitizer-ubsan"
+      ],
+      "displayName": "Debug UBSAN build with tests and more optional 
components",
+      "cacheVariables": {}
+    },
     {
       "name": "fuzzing",
-      "inherits": "base",
+      "inherits": [
+        "base",
+        "sanitizer-asan",
+        "sanitizer-ubsan"
+      ],
       "displayName": "Debug build with IPC and Parquet fuzzing targets",
       "cacheVariables": {
         "CMAKE_BUILD_TYPE": "Debug",
         "CMAKE_C_COMPILER": "clang",
         "CMAKE_CXX_COMPILER": "clang++",
-        "ARROW_USE_ASAN": "ON",
-        "ARROW_USE_UBSAN": "ON",
         "ARROW_IPC": "ON",
         "ARROW_PARQUET": "ON",
         "ARROW_FUZZING": "ON"

Reply via email to