From 99324e417a849583a959150cb81dbe33743a41bd Mon Sep 17 00:00:00 2001 From: FritzFlorian Date: Wed, 27 Mar 2019 10:25:55 +0100 Subject: [PATCH] Add address sanitizer to CI. --- .gitlab-ci.yml | 5 +++++ ci_scripts/run_addres_sanitizer.sh | 12 ++++++++++++ 2 files changed, 17 insertions(+) create mode 100755 ci_scripts/run_addres_sanitizer.sh diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 95f4b16..975ba41 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -22,3 +22,8 @@ run_thread_sanitizer: stage: sanitizer script: ./ci_scripts/run_thread_sanitizer.sh + +run_address_sanitizer: + stage: sanitizer + script: + ./ci_scripts/run_address_sanitizer.sh diff --git a/ci_scripts/run_addres_sanitizer.sh b/ci_scripts/run_addres_sanitizer.sh new file mode 100755 index 0000000..ab095af --- /dev/null +++ b/ci_scripts/run_addres_sanitizer.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +mkdir cmake-build-release-address-sanitizer +cd cmake-build-release-address-sanitizer +cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DTHREAD_SANITIZER=OFF -DADDRESS_SANITIZER=ON +make + +# run the actual tests with sanitizer enabled, reporting the result +ASAN_OPTIONS="detect_stack_use_after_return=1 detect_leaks=1" ./bin/tests +STATUS_CODE=$? + +exit $STATUS_CODE -- libgit2 0.26.0