From 12d217f454ffa322751447b3358a0cf126beb0d1 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 27 Feb 2025 18:51:15 +0100 Subject: [PATCH 1/2] No need to delete the "only" keyword in generate-tsan-stress-jobs.py 29fd7564083731373bd132ec65ffc0a9072f8efc replaced "only" with "rules" in .gitlab-ci.yml but forgot to drop the removal from here, hence the script was broken. (cherry picked from commit 6e2272d769a205e7ca98f698a578f9daf6d8d28d) --- util/generate-tsan-stress-jobs.py | 1 - 1 file changed, 1 deletion(-) diff --git a/util/generate-tsan-stress-jobs.py b/util/generate-tsan-stress-jobs.py index a8b6566bd8..8ee649ed6f 100755 --- a/util/generate-tsan-stress-jobs.py +++ b/util/generate-tsan-stress-jobs.py @@ -29,7 +29,6 @@ for tsan_job in "gcc:tsan", "clang:tsan": tsan_stress_test_job["needs"] = [ {"pipeline": "$PARENT_PIPELINE_ID", "job": tsan_job} ] - del tsan_stress_test_job["only"] print( yaml.dump( From ea9a81bcb7380ed6ebcd277aa177bed9e7b459e9 Mon Sep 17 00:00:00 2001 From: Michal Nowak Date: Thu, 27 Feb 2025 11:32:53 +0100 Subject: [PATCH 2/2] Fix Clang TSAN reports Disabling new dynamic ELF tags ensures the Clang symbolizer creates valid TSAN reports. For consistency, also add the option to gcc:tsan so they are both on the same footing. (cherry picked from commit ac9eec632718a20a3454d2d547fea60d58fc603c) --- .gitlab-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ffcda74486..9db237073e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1312,7 +1312,7 @@ gcc:tsan: variables: CC: gcc CFLAGS: "${CFLAGS_COMMON} -Wno-stringop-overread -ggdb -O2 -fsanitize=thread" - LDFLAGS: "-fsanitize=thread" + LDFLAGS: "-fsanitize=thread -Wl,--disable-new-dtags" EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc PKG_CONFIG_PATH=/opt/tsan/lib/pkgconfig" <<: *tsan_fedora_41_amd64_image <<: *build_job @@ -1341,7 +1341,8 @@ clang:tsan: variables: CC: "${CLANG}" CFLAGS: "${CFLAGS_COMMON} -ggdb -O2 -fsanitize=thread" - LDFLAGS: "-fsanitize=thread" + # -Wl,--disable-new-dtags ensures that Clang creates valid TSAN reports + LDFLAGS: "-fsanitize=thread -Wl,--disable-new-dtags" EXTRA_CONFIGURE: "--with-libidn2 --enable-pthread-rwlock --without-jemalloc PKG_CONFIG_PATH=/opt/tsan/lib/pkgconfig" system:clang:tsan: