Fixes for AddressSanitizer not working in valgrind.
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
4eb33d7964
commit
d6c8512617
15
.drone.yml
15
.drone.yml
|
@ -26,8 +26,19 @@ steps:
|
||||||
commands:
|
commands:
|
||||||
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release . -B build-release -DSTATICC=ON -DARBUTILS_TESTS=ON
|
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release . -B build-release -DSTATICC=ON -DARBUTILS_TESTS=ON
|
||||||
- cmake --build build-release --target all -- -j 4
|
- cmake --build build-release --target all -- -j 4
|
||||||
- cd build-debug
|
- cd build-release
|
||||||
- ./ArbutilsTests -s --duration=true --force-colors=true
|
- ./ArbutilsTests -s --duration=true --force-colors=true
|
||||||
|
- name: test-release-linux_valgrind
|
||||||
|
image: deukhoofd/linux64builder
|
||||||
|
environment:
|
||||||
|
CC: /usr/bin/clang
|
||||||
|
CXX: /usr/bin/clang++
|
||||||
|
CMAKE_RANLIB: /usr/bin/llvm-ranlib
|
||||||
|
CMAKE_AR: /usr/bin/llvm-ar
|
||||||
|
commands:
|
||||||
|
- cmake -GNinja -DCMAKE_BUILD_TYPE=Release . -B build-release_valgrind -DSTATICC=ON -DARBUTILS_TESTS=ON -DSANITIZER_TESTS=OFF
|
||||||
|
- cmake --build build-release_valgrind --target all -- -j 4
|
||||||
|
- cd build-release_valgrind
|
||||||
- valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no --error-exitcode=1 ./ArbutilsTests
|
- valgrind --tool=memcheck --gen-suppressions=all --leak-check=full --leak-resolution=med --track-origins=yes --vgdb=no --error-exitcode=1 ./ArbutilsTests
|
||||||
- name: test-release-windows
|
- name: test-release-windows
|
||||||
image: deukhoofd/windowsbuilder
|
image: deukhoofd/windowsbuilder
|
||||||
|
@ -63,6 +74,6 @@ volumes:
|
||||||
path: /home/docs/Arbutils
|
path: /home/docs/Arbutils
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 38b3e0329693c61f83bcee5a596e6c560a591dc9f8ac8362e60387a99acb3626
|
hmac: 8ee9294785e0ce2853d4cfb01ae39ddd82e1c3152b8917cc459d84cbc82e8aaf
|
||||||
|
|
||||||
...
|
...
|
||||||
|
|
|
@ -17,6 +17,7 @@ endif ()
|
||||||
option(WINDOWS "Whether the build target is Windows or not." OFF)
|
option(WINDOWS "Whether the build target is Windows or not." OFF)
|
||||||
option(SHARED "Whether we should build a shared library, instead of a static one." OFF)
|
option(SHARED "Whether we should build a shared library, instead of a static one." OFF)
|
||||||
option(ARBUTILS_TESTS "Whether the test executable should be build as well." OFF)
|
option(ARBUTILS_TESTS "Whether the test executable should be build as well." OFF)
|
||||||
|
option(SANITIZER_TESTS "Whether the test executable should be built using address sanitizer." ON)
|
||||||
option(STATICC "Whether gcc and stdc++ should be linked statically to the library." OFF)
|
option(STATICC "Whether gcc and stdc++ should be linked statically to the library." OFF)
|
||||||
option(PRETTYTRACES "Whether full stacktraces should be included. Note that this adds a dependency to libdw." ON)
|
option(PRETTYTRACES "Whether full stacktraces should be included. Note that this adds a dependency to libdw." ON)
|
||||||
option(SIGNAL_HANDLING "whether to include signal handling." OFF)
|
option(SIGNAL_HANDLING "whether to include signal handling." OFF)
|
||||||
|
@ -120,8 +121,10 @@ if (ARBUTILS_TESTS)
|
||||||
# Add a compilation definition to the code that we are building a test build.
|
# Add a compilation definition to the code that we are building a test build.
|
||||||
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
|
target_compile_definitions(ArbutilsTests PRIVATE TESTS_BUILD)
|
||||||
|
|
||||||
target_compile_options(ArbutilsTests PRIVATE -fsanitize=address)
|
if (SANITIZER_TESTS)
|
||||||
target_link_options(ArbutilsTests PRIVATE -fsanitize=address)
|
target_compile_options(ArbutilsTests PRIVATE -fsanitize=address)
|
||||||
|
target_link_options(ArbutilsTests PRIVATE -fsanitize=address)
|
||||||
|
endif()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue