Skip to content

Commit 0103baf

Browse files
committed
Revert "Integrate Google AddressSanitizer (aka ASan) in tests"
This reverts commit 0efd96b.
1 parent 0efd96b commit 0103baf

File tree

2 files changed

+2
-26
lines changed

2 files changed

+2
-26
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
strategy:
1919
matrix:
2020
os: [ubuntu-22.04]
21-
backend: [mkl, dnnl, asan]
21+
backend: [mkl, dnnl]
2222

2323
steps:
2424
- uses: actions/checkout@v4
@@ -50,15 +50,6 @@ jobs:
5050
sudo apt-get install -y intel-oneapi-dnnl-devel=$DNNL_VERSION intel-oneapi-dnnl=$DNNL_VERSION
5151
cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DBUILD_TESTS=ON -DWITH_MKL=OFF -DOPENMP_RUNTIME=COMP -DWITH_DNNL=ON .
5252
53-
- name: Configure with ASAN
54-
if: startsWith(matrix.os, 'ubuntu') && matrix.backend == 'asan'
55-
env:
56-
DNNL_VERSION: 2023.0.0-25399
57-
run: |
58-
sudo apt-get install -y intel-oneapi-dnnl-devel=$DNNL_VERSION intel-oneapi-dnnl=$DNNL_VERSION
59-
cmake -DCMAKE_INSTALL_PREFIX=$PWD/install -DBUILD_TESTS=ON -DWITH_MKL=OFF -DOPENMP_RUNTIME=COMP -DWITH_DNNL=ON \
60-
-DGOOGLE_ADDRESS_SANITIZER=ON -DCMAKE_BUILD_TYPE=Debug .
61-
6253
- name: Build
6354
run: |
6455
make install
@@ -80,10 +71,7 @@ jobs:
8071
if: matrix.backend == 'dnnl'
8172
run: |
8273
tests/ctranslate2_test tests/data
83-
- name: Test ASAN
84-
if: matrix.backend == 'asan'
85-
run: |
86-
ASAN_OPTIONS=detect_leaks=1:print_stats=1 tests/ctranslate2_test tests/data
74+
8775
8876
build-and-test-cpp-aarch64:
8977
runs-on: ubuntu-22.04

CMakeLists.txt

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ option(BUILD_TESTS "Compile the tests" OFF)
2222
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
2323
option(WITH_TENSOR_PARALLEL "Compile with NCCL and MPI backend" OFF)
2424
option(WITH_FLASH_ATTN "Compile with Flash Attention 2" OFF)
25-
option(GOOGLE_ADDRESS_SANITIZER "ASAN" OFF)
26-
2725

2826
if(ENABLE_PROFILING)
2927
message(STATUS "Enable profiling support")
@@ -446,16 +444,6 @@ if (WITH_RUY)
446444
list(APPEND LIBRARIES ruy)
447445
endif()
448446

449-
IF (GOOGLE_ADDRESS_SANITIZER AND (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "DEBUG"))
450-
MESSAGE (STATUS "GOOGLE_ADDRESS_SANITIZER: ENABLED")
451-
set(ASAN_FLAGS " -fsanitize=address -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-common")
452-
string(APPEND CMAKE_C_FLAGS ${ASAN_FLAGS})
453-
string(APPEND CMAKE_CXX_FLAGS ${ASAN_FLAGS})
454-
add_link_options(-fsanitize=address)
455-
ELSEIF (GOOGLE_ADDRESS_SANITIZER)
456-
MESSAGE(FATAL_ERROR "SANITIZER requires Debug build type") # simplify CMake configuration for now
457-
ENDIF ()
458-
459447
if (WITH_CUDA)
460448
find_package(CUDA 11.0 REQUIRED)
461449
list(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)

0 commit comments

Comments
 (0)