Skip to content

Commit

Permalink
Enable ASan on CI Rocky preset (#11332)
Browse files Browse the repository at this point in the history
  • Loading branch information
masaori335 committed May 15, 2024
1 parent 7697c89 commit 2a6cfef
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 5 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 2 additions & 3 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
},
{
Expand Down Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions ci/asan_leak_suppression/regression.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 4 additions & 0 deletions plugins/experimental/uri_signing/unit_tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at

# http://www.apache.org/licenses/LICENSE-2.0

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# dlopen of plugins that link with ImageMagick results in ASan reporting a leak
# 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:libcjose.so
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 2a6cfef

Please sign in to comment.