ThreadSanitizer: data race dighost.c:1648 in destroy_lookup
Binary: dig
Commit: c5b6f215
Tests: cacheclean
WARNING: ThreadSanitizer: data race (pid=51728)
Write of size 8 at 0x7b8800000d68 by main thread:
#0 destroy_lookup dighost.c:1648 (dig:x86_64+0x10000bf3b)
#1 dig_shutdown dig.c:2540 (dig:x86_64+0x100003c2f)
Previous read of size 8 at 0x7b8800000d68 by thread T1 (mutexes: write M1112):
#0 clone_lookup dighost.c:842 (dig:x86_64+0x100008ea4)
#1 parse_args dig.c:2172 (dig:x86_64+0x100003200)
#2 start_lookup dighost.c:1708 (dig:x86_64+0x10000c4e2)
#3 recv_done dighost.c (dig:x86_64+0x100015f53)
#4 run task.c:1134 (libisc.1503.dylib:x86_64+0x2c9e1)
Location is heap block of size 5177 at 0x7b8800000000 allocated by main thread:
#0 malloc <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e65a)
#1 default_memalloc mem.c:685 (libisc.1503.dylib:x86_64+0x17ae1)
#2 parse_args dig.c:2133 (dig:x86_64+0x10000306d)
Mutex M1112 (0x0001022586d8) created at:
#0 pthread_mutex_init <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2b9a3)
#1 isc__mutex_init mutex.c:286 (libisc.1503.dylib:x86_64+0x46c4a)
#2 dig_setup dig.c:2503 (dig:x86_64+0x100001a73)
Thread T1 (tid=4675817, running) created by main thread at:
#0 pthread_create <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x2a9cd)
#1 isc_thread_create thread.c:75 (libisc.1503.dylib:x86_64+0x46d1c)
#2 setup_libs dighost.c:1382 (dig:x86_64+0x10000b448)
#3 dig_setup dig.c:2503 (dig:x86_64+0x100001a73)
SUMMARY: ThreadSanitizer: data race dighost.c:1648 in destroy_lookup