Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: Sanitizer build with Ubuntu 20.04 #3636

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ no_rotation:
- docker
- linux

ubuntu-20.04-sanitizer:
<<: *global_job_definition
image: docker.pkg.github.com/espressomd/docker/ubuntu-20.04:a1192b35590a1a474c55fe1e9a1e6c25758454ea
stage: build
script:
- export myconfig=maxset with_cuda=false with_coverage=false with_static_analysis=true with_asan=true with_ubsan=true test_timeout=900 ASAN_OPTIONS="allocator_may_return_null=1" OMPI_CC=clang-9 OMPI_CXX=clang++-9 CC=clang-9 CXX=clang++-9 UBSAN_OPTIONS=suppressions=/home/espresso/espresso/maintainer/CI/ubsan.supp
jngrad marked this conversation as resolved.
Show resolved Hide resolved
- bash maintainer/CI/build_cmake.sh
tags:
- docker
- linux

### Builds with different Distributions

debian:10:
Expand Down
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,9 @@ endif()

if(WITH_CLANG_TIDY)
find_package(ClangTidy "${CMAKE_CXX_COMPILER_VERSION}" EXACT REQUIRED)
set(CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_EXE}")
set(CLANG_TIDY_EXCLUDES "[{name: boost/mpi/collectives/all_reduce.hpp}]")
set(CMAKE_CXX_CLANG_TIDY
"${CLANG_TIDY_EXE};--line-filter=${CLANG_TIDY_EXCLUDES}")
endif()

if(WITH_TESTS)
Expand Down
10 changes: 10 additions & 0 deletions maintainer/CI/ubsan.supp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Stuff occuring in boost directly
null:boost/serialization/singleton.hpp
null:boost/mpi/detail/binary_buffer_iprimitive.hpp
null:boost/mpi/communicator.hpp

# Caused by boost MPI
null:stl_iterator.h

# function calls with invalid pointers in Cython-generated code
function:python/espressomd/*.cpp
4 changes: 2 additions & 2 deletions src/python/espressomd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ foreach(cython_file ${cython_SRC})
${outputpath}
PROPERTIES
COMPILE_FLAGS
"-Wno-pedantic -Wno-cpp -Wno-strict-aliasing -Wno-maybe-uninitialized -Wno-unused-variable"
"-Wno-pedantic -Wno-cpp -Wno-strict-aliasing -Wno-maybe-uninitialized -Wno-unused-variable -Wno-deprecated-declarations"
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR CMAKE_CXX_COMPILER_ID
STREQUAL "AppleClang")
set_source_files_properties(
${outputpath}
PROPERTIES
COMPILE_FLAGS
"-Wno-pedantic -Wno-#warnings -Wno-sometimes-uninitialized -Wno-unused-variable"
"-Wno-pedantic -Wno-#warnings -Wno-sometimes-uninitialized -Wno-unused-variable -Wno-deprecated-declarations"
)
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
set_source_files_properties(${outputpath} PROPERTIES COMPILE_FLAGS
Expand Down