From: Mark Andrews Date: Thu, 15 Oct 2020 07:39:02 +0000 (+1100) Subject: Ingore TSAN errors accessing 'last' X-Git-Tag: v9.11.27~8^2~3 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=7382c3929a0cb04b35ee31d5d3e660cdc6c6ac54;p=thirdparty%2Fbind9.git Ingore TSAN errors accessing 'last' WARNING: ThreadSanitizer: data race Read of size 4 at 0x000000000001 by thread T1: #0 log_quota bin/named/query.c:4291:22 #1 query_recurse bin/named/query.c:4346:4 #2 query_find bin/named/query.c #3 ns_query_start bin/named/query.c:9716:8 #4 client_request bin/named/client.c:3115:3 #5 dispatch lib/isc/task.c:1157:7 #6 run lib/isc/task.c:1331:2 Previous write of size 4 at 0x000000000001 by thread T2: #0 last_cmpxchg bin/named/query.c:81:6 #1 log_quota bin/named/query.c:4293:7 #2 query_recurse bin/named/query.c:4346:4 #3 query_find bin/named/query.c #4 ns_query_start bin/named/query.c:9716:8 #5 client_request bin/named/client.c:3115:3 #6 dispatch lib/isc/task.c:1157:7 #7 run lib/isc/task.c:1331:2 --- diff --git a/bin/named/query.c b/bin/named/query.c index 3d196f1277e..25045475598 100644 --- a/bin/named/query.c +++ b/bin/named/query.c @@ -75,7 +75,7 @@ #define last_cmpxchg(x, e, r) isc_atomic_cmpxchg((int32_t*)x, (*(int32_t*)(e)), (int32_t)(r)) #else #define last_load(x) (*(x)) -static inline bool +ISC_NO_SANITIZE_THREAD static ISC_NO_SANITIZE_INLINE bool last_cmpxchg(isc_stdtime_t *x, isc_stdtime_t *e, isc_stdtime_t r) { if (*x == *e) { *x = r;