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

masaori pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 2a6cfefb0f Enable ASan on CI Rocky preset (#11332)
2a6cfefb0f is described below

commit 2a6cfefb0f537f81af5ed29e4be164e5c7cee8e2
Author: Masaori Koshiba <masa...@apache.org>
AuthorDate: Wed May 15 13:17:57 2024 +0900

    Enable ASan on CI Rocky preset (#11332)
---
 CMakeLists.txt                                                       | 4 ++--
 CMakePresets.json                                                    | 5 ++---
 ci/asan_leak_suppression/regression.txt                              | 3 +++
 plugins/experimental/magick/image_magic_dlopen_leak_suppression.txt  | 1 +
 plugins/experimental/uri_signing/unit_tests/CMakeLists.txt           | 4 ++++
 .../uri_signing/unit_tests/uri_signing_test_leak_suppression.txt}    | 2 +-
 plugins/webp_transform/image_magic_dlopen_leak_suppression.txt       | 3 +++
 7 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1930b51fd6..89f7f6cad7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -327,8 +327,8 @@ if(ENABLE_ASAN)
   if(ENABLE_JEMALLOC OR ENABLE_MIMALLOC)
     message(FATAL_ERROR "ENABLE_JEMALLOC and ENABLE_MIMALLOC are not 
compatible with asan builds")
   endif()
-  add_compile_options(-fsanitize=address -fno-omit-frame-pointer)
-  add_link_options(-fsanitize=address)
+  add_compile_options(-g -fsanitize=address -fno-omit-frame-pointer)
+  add_link_options(-g -fsanitize=address)
 endif()
 
 if(ENABLE_PROBES)
diff --git a/CMakePresets.json b/CMakePresets.json
index aad0eccaa1..ceaea5737f 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -77,8 +77,7 @@
       "name": "asan",
       "hidden": true,
       "cacheVariables": {
-        "CMAKE_CXX_FLAGS_DEBUG": "-g -fsanitize=address,undefined",
-        "CMAKE_C_FLAGS_DEBUG": "-g -fsanitize=address,undefined"
+        "ENABLE_ASAN": "ON"
       }
     },
     {
@@ -145,7 +144,7 @@
       "name": "ci-rocky",
       "displayName": "CI Rocky",
       "description": "CI Pipeline config for Rocky Linux",
-      "inherits": ["ci"],
+      "inherits": ["ci", "asan"],
       "cacheVariables": {
         "OPENSSL_ROOT_DIR": "/opt/h3-tools-boringssl/boringssl",
         "quiche_ROOT": "/opt/h3-tools-boringssl/quiche",
diff --git a/ci/asan_leak_suppression/regression.txt 
b/ci/asan_leak_suppression/regression.txt
index 4f750d0165..4e98783f67 100644
--- a/ci/asan_leak_suppression/regression.txt
+++ b/ci/asan_leak_suppression/regression.txt
@@ -18,3 +18,6 @@ leak:RegressionTest_SDK_API_TSPortDescriptor
 leak:RegressionTest_HostDBProcessor
 leak:RegressionTest_DNS
 leak:RegressionTest_UDPNet_echo
+leak:HttpConfig::startup
+# libswoc
+leak:MemArena::make_block
diff --git 
a/plugins/experimental/magick/image_magic_dlopen_leak_suppression.txt 
b/plugins/experimental/magick/image_magic_dlopen_leak_suppression.txt
index a187337c19..b6910146ee 100644
--- a/plugins/experimental/magick/image_magic_dlopen_leak_suppression.txt
+++ b/plugins/experimental/magick/image_magic_dlopen_leak_suppression.txt
@@ -19,3 +19,4 @@
 # plugin itself is not leaking because all other code for the plugin had been
 # commented out so there was nothing to leak in the plugin.
 leak:plugin_dso_load
+leak:libquiche.so
diff --git a/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt 
b/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt
index e53460ff8b..464ecce74a 100644
--- a/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt
+++ b/plugins/experimental/uri_signing/unit_tests/CMakeLists.txt
@@ -47,3 +47,7 @@ target_link_libraries(
           OpenSSL::Crypto
 )
 add_test(NAME uri_signing_test COMMAND uri_signing_test)
+set_tests_properties(
+  uri_signing_test
+  PROPERTIES ENVIRONMENT 
"LSAN_OPTIONS=suppressions=${CMAKE_CURRENT_SOURCE_DIR}/uri_signing_test_leak_suppression.txt"
+)
diff --git a/plugins/webp_transform/image_magic_dlopen_leak_suppression.txt 
b/plugins/experimental/uri_signing/unit_tests/uri_signing_test_leak_suppression.txt
similarity index 98%
copy from plugins/webp_transform/image_magic_dlopen_leak_suppression.txt
copy to 
plugins/experimental/uri_signing/unit_tests/uri_signing_test_leak_suppression.txt
index a187337c19..8a69352972 100644
--- a/plugins/webp_transform/image_magic_dlopen_leak_suppression.txt
+++ 
b/plugins/experimental/uri_signing/unit_tests/uri_signing_test_leak_suppression.txt
@@ -18,4 +18,4 @@
 # for the verify_global tests for those plugins. It has been verified that the
 # plugin itself is not leaking because all other code for the plugin had been
 # commented out so there was nothing to leak in the plugin.
-leak:plugin_dso_load
+leak:libcjose.so
diff --git a/plugins/webp_transform/image_magic_dlopen_leak_suppression.txt 
b/plugins/webp_transform/image_magic_dlopen_leak_suppression.txt
index a187337c19..6d9d5dbabf 100644
--- a/plugins/webp_transform/image_magic_dlopen_leak_suppression.txt
+++ b/plugins/webp_transform/image_magic_dlopen_leak_suppression.txt
@@ -19,3 +19,6 @@
 # plugin itself is not leaking because all other code for the plugin had been
 # commented out so there was nothing to leak in the plugin.
 leak:plugin_dso_load
+
+leak:libquiche.so
+

Reply via email to