From 6ab2d8968603b624772f5fb82c09373a8a8d79c0 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 18 Feb 2021 16:19:57 +0100 Subject: [PATCH 1/3] Use Fedora image for GCC ASAN and TSAN CI jobs For the sake of running ASAN and TSAN jobs with the latest stable GCC, replace "base image" (Debian Buster with GCC 8.3.0) with Fedora 34 image with GCC 11. --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 00235e4ddf..efda8278ec 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -928,13 +928,13 @@ gcc:asan: CFLAGS: "${CFLAGS_COMMON} -fsanitize=address,undefined" LDFLAGS: "-fsanitize=address,undefined" EXTRA_CONFIGURE: "--with-libidn2 --without-jemalloc" - <<: *base_image + <<: *fedora_34_amd64_image <<: *build_job system:gcc:asan: variables: ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON} - <<: *base_image + <<: *fedora_34_amd64_image <<: *system_test_job needs: - job: gcc:asan @@ -943,7 +943,7 @@ system:gcc:asan: unit:gcc:asan: variables: ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON} - <<: *base_image + <<: *fedora_34_amd64_image <<: *unit_test_job needs: - job: gcc:asan @@ -979,18 +979,18 @@ unit:clang:asan: # Jobs for TSAN builds on Debian 10 "buster" (amd64) gcc:tsan: - <<: *base_image - <<: *build_job variables: CC: gcc CFLAGS: "${CFLAGS_COMMON} -fsanitize=thread" LDFLAGS: "-fsanitize=thread" EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc" + <<: *fedora_34_amd64_image + <<: *build_job system:gcc:tsan: variables: TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON} - <<: *base_image + <<: *fedora_34_amd64_image <<: *system_test_tsan_job needs: - job: gcc:tsan @@ -999,7 +999,7 @@ system:gcc:tsan: unit:gcc:tsan: variables: TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON} suppressions=$CI_PROJECT_DIR/tsan-suppressions.txt - <<: *base_image + <<: *fedora_34_amd64_image <<: *unit_test_tsan_job needs: - job: gcc:tsan From 1f4a56cb3e826dd61effae29d3fa3354879463cf Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 20 Oct 2021 16:06:45 +0200 Subject: [PATCH 2/3] Rename ASAN_OPTIONS_COMMON to ASAN_OPTIONS Renaming the variable removes some of the complexity. --- .gitlab-ci.yml | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index efda8278ec..200e415d89 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,7 +21,7 @@ variables: CFLAGS_COMMON: -fno-omit-frame-pointer -fno-optimize-sibling-calls -O1 -g -Wall -Wextra # Pass run-time flags to AddressSanitizer to get core dumps on error. - ASAN_OPTIONS_COMMON: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 + ASAN_OPTIONS: abort_on_error=1:disable_coredump=0:unmap_shadow_on_exit=1 TSAN_OPTIONS_COMMON: "disable_coredump=0 second_deadlock_stack=1 history_size=7 log_exe_name=true log_path=tsan external_symbolizer_path=/usr/lib/llvm-12/bin/llvm-symbolizer" TARBALL_EXTENSION: xz @@ -932,8 +932,6 @@ gcc:asan: <<: *build_job system:gcc:asan: - variables: - ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON} <<: *fedora_34_amd64_image <<: *system_test_job needs: @@ -941,8 +939,6 @@ system:gcc:asan: artifacts: true unit:gcc:asan: - variables: - ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON} <<: *fedora_34_amd64_image <<: *unit_test_job needs: @@ -959,8 +955,6 @@ clang:asan: <<: *build_job system:clang:asan: - variables: - ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON} <<: *base_image <<: *system_test_job needs: @@ -968,8 +962,6 @@ system:clang:asan: artifacts: true unit:clang:asan: - variables: - ASAN_OPTIONS: ${ASAN_OPTIONS_COMMON} <<: *base_image <<: *unit_test_job needs: From 6179011a50381d2fdee865cefdd705c41e5662cf Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Wed, 20 Oct 2021 19:47:17 +0200 Subject: [PATCH 3/3] Drop GCC ThreadSanitizer suppresion of fstrm-originated calls With custom fstrm library in the Fedora image which uses mutexes instead of barriers ThreadSanitizer suppression with GCC is not necessary anymore. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 200e415d89..d11ff416fa 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -990,7 +990,7 @@ system:gcc:tsan: unit:gcc:tsan: variables: - TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON} suppressions=$CI_PROJECT_DIR/tsan-suppressions.txt + TSAN_OPTIONS: ${TSAN_OPTIONS_COMMON} <<: *fedora_34_amd64_image <<: *unit_test_tsan_job needs: