]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix Clang TSAN reports
authorMichal Nowak <mnowak@isc.org>
Thu, 27 Feb 2025 10:32:53 +0000 (11:32 +0100)
committerMichal Nowak <mnowak@isc.org>
Fri, 28 Feb 2025 08:01:46 +0000 (09:01 +0100)
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.

.gitlab-ci.yml

index e0c936e99f4339ea7b00e5d1fa045bfedd27a67f..7b83374f0b3aa3d54c84f4e66fabba52f2c34927 100644 (file)
@@ -1305,7 +1305,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
@@ -1334,7 +1334,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: