Skip to content

Commit 33c3176

Browse files
committed
CI: fix TSAN build with new sysrepo
Upstream started using a little bit more advanced pthread functions for timed locking. Unfortunately, TSAN doesn't have interceptors for these. Before I push that upstream (and we get a new release of LLVM), let's use sysrepo's compat layer for using the traditional pthread functions which are well supported in today's TSAN. Change-Id: Id98793eec7a0fba775d871b3b6bf54e0dacab0f4
1 parent 75d5814 commit 33c3176

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ci/build.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ if [[ $ZUUL_JOB_NAME =~ .*-tsan ]]; then
4040
export CXXFLAGS="-fsanitize=thread ${CXXFLAGS}"
4141
export LDFLAGS="-fsanitize=thread ${LDFLAGS}"
4242
export TSAN_OPTIONS="suppressions=${ZUUL_PROJECT_SRC_DIR}/ci/tsan.supp"
43+
44+
# Our TSAN does not have interceptors for a variety of "less common" functions such as pthread_mutex_clocklock.
45+
# Disable all functions which are optional in sysrepo/libnetconf2/Netopeer2.
46+
CMAKE_OPTIONS="${CMAKE_OPTIONS} -DHAVE_PTHREAD_MUTEX_TIMEDLOCK=OFF -DHAVE_PTHREAD_MUTEX_CLOCKLOCK=OFF -DHAVE_PTHREAD_RWLOCK_CLOCKRDLOCK=OFF -DHAVE_PTHREAD_RWLOCK_CLOCKWRLOCK=OFF -DHAVE_PTHREAD_COND_CLOCKWAIT=OFF"
4347
fi
4448

4549
if [[ $ZUUL_JOB_NAME =~ .*-cover.* ]]; then

0 commit comments

Comments
 (0)