Commit 2f9dd887 authored by Nikolaus Demmel's avatar Nikolaus Demmel

add address sanitizer in ci

parent 21ac2840
......@@ -64,6 +64,16 @@ bionic-relwithdebinfo-compile:
variables:
BUILD_TYPE: RelWithDebInfo
bionic-asan-build:
<<: *prepare_docker_definition
<<: *compile_and_test_definition
variables:
CC: clang-8
CXX: clang++-8
BUILD_TYPE: SanitizerRelWithDebInfo
# LeakSanitizer doesn't work in (non-priviliged) container
ASAN_OPTIONS: "detect_leaks=0"
xenial-release-compile:
<<: *prepare_docker_definition
<<: *compile_and_test_definition
......@@ -81,6 +91,14 @@ mojave-relwithdebinfo-compile:
variables:
BUILD_TYPE: RelWithDebInfo
mojave-brewedclang-asan-build:
<<: *compile_and_test_definition
tags: [macos, "10.14"]
variables:
CC: /usr/local/opt/llvm/bin/clang
CXX: /usr/local/opt/llvm/bin/clang++
BUILD_TYPE: SanitizerRelWithDebInfo
# check if clang-format would make any changes
clang-format:
tags:
......
......@@ -42,6 +42,8 @@ SET(CMAKE_CXX_FLAGS "-Wall -Werror -Wextra -march=${CXX_MARCH} ${CMAKE_CXX_FLAGS
SET(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} --coverage -fno-inline -fno-inline-small-functions -fno-default-inline")
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage")
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} --coverage")
set(CMAKE_CXX_FLAGS_SANITIZERDEBUG "-O0 -g0 -DEIGEN_INITIALIZE_MATRICES_BY_NAN -fno-omit-frame-pointer -fsanitize=address")
set(CMAKE_CXX_FLAGS_SANITIZERRELWITHDEBINFO "-O3 -g0 -DEIGEN_INITIALIZE_MATRICES_BY_NAN -fno-omit-frame-pointer -fsanitize=address")
set(EIGEN_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/eigen")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment