]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Ingore TSAN errors accessing 'last'
authorMark Andrews <marka@isc.org>
Thu, 15 Oct 2020 07:39:02 +0000 (18:39 +1100)
committerMark Andrews <marka@isc.org>
Thu, 10 Dec 2020 06:31:19 +0000 (06:31 +0000)
    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

bin/named/query.c

index 3d196f1277e46c9ceb337aa61943b5242fbffdba..25045475598795a142f56d6a3b5c1be8525c321b 100644 (file)
@@ -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;