]> git.ipfire.org Git - thirdparty/bind9.git/commit
Move cleanup of queries to later in the shutdown sequence
authorMark Andrews <marka@isc.org>
Thu, 4 Mar 2021 06:22:01 +0000 (17:22 +1100)
committerOndřej Surý <ondrej@isc.org>
Thu, 4 Mar 2021 14:02:07 +0000 (15:02 +0100)
commitce5dc75e48a2cc541c65bee3817f1697aa829cb6
tree4e5686e631f80578495fb7a766ddf5c9c7c1a18b
parentd86578674e77fb74a5f16a71f19f6fe73e26dbd8
Move cleanup of queries to later in the shutdown sequence

to avoid TSAN report

    WARNING: ThreadSanitizer: data race
      Write of size 8 at 0x000000000001 by main thread:
        #0 free <null>
        #1 default_memfree lib/isc/mem.c:440
        #2 mem_put lib/isc/mem.c:363
        #3 isc__mem_free lib/isc/mem.c:1012
        #4 main bin/tools/mdig.c:2231

      Previous read of size 1 at 0x000000000005 by thread T1:
        #0 dns_name_fromtext lib/dns/name.c:1121
        #1 sendquery bin/tools/mdig.c:596
        #2 sendqueries bin/tools/mdig.c:779
        #3 dispatch lib/isc/task.c:1153
        #4 run lib/isc/task.c:1345
        #5 isc__trampoline_run lib/isc/trampoline.c:184
        #6 <null> <null>

      Thread T1 (running) created by main thread at:
        #0 pthread_create <null>
        #1 isc_thread_create pthreads/thread.c:79
        #2 isc_taskmgr_create lib/isc/task.c:1435
        #3 main bin/tools/mdig.c:2148

    SUMMARY: ThreadSanitizer: data race in __interceptor_free

(cherry picked from commit 4015af02d8bcce34435001bf69892bd3a209a877)
bin/tools/mdig.c