Data races in dnstap [v9.11]
There's all kind of data races in dnstap part of libdns:
ThreadSanitizer: data race in fwrite
WARNING: ThreadSanitizer: data race
Read of size 8 at 0x000000000001 by thread T1:
#0 fwrite <null>
#1 <null> <null>
Previous write of size 8 at 0x000000000001 by main thread:
#0 malloc <null>
#1 pack_dt lib/dns/dnstap.c:543:14
#2 dns_dt_send lib/dns/dnstap.c:779:6
#3 send_test lib/dns/tests/dnstap_test.c:258:3
#4 cmocka_run_one_test_or_fixture <null>
#5 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
Location is heap block of size 256 at 0x000000000010 allocated by main thread:
#0 malloc <null>
#1 pack_dt lib/dns/dnstap.c:543:14
#2 dns_dt_send lib/dns/dnstap.c:779:6
#3 send_test lib/dns/tests/dnstap_test.c:258:3
#4 cmocka_run_one_test_or_fixture <null>
#5 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 fstrm_iothr_init <null>
#2 send_test lib/dns/tests/dnstap_test.c:176:11
#3 cmocka_run_one_test_or_fixture <null>
#4 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
SUMMARY: ThreadSanitizer: data race in fwrite
ThreadSanitizer: data race in free
WARNING: ThreadSanitizer: data race
Write of size 8 at 0x000000000001 by thread T1:
#0 free <null>
#1 <null> <null>
Previous write of size 8 at 0x000000000001 by main thread:
#0 malloc <null>
#1 pack_dt lib/dns/dnstap.c:543:14
#2 dns_dt_send lib/dns/dnstap.c:779:6
#3 send_test lib/dns/tests/dnstap_test.c:260:3
#4 cmocka_run_one_test_or_fixture <null>
#5 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 fstrm_iothr_init <null>
#2 send_test lib/dns/tests/dnstap_test.c:176:11
#3 cmocka_run_one_test_or_fixture <null>
#4 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
SUMMARY: ThreadSanitizer: data race in free
ThreadSanitizer: data race in memcpy
WARNING: ThreadSanitizer: data race
Read of size 8 at 0x000000000001 by thread T1:
#0 memcpy <null>
#1 <null> <null>
Previous write of size 8 at 0x000000000001 by main thread:
#0 memcpy <null>
#1 <null> <null>
#2 dns_dt_send lib/dns/dnstap.c:780:3
#3 send_test lib/dns/tests/dnstap_test.c:254:3
#4 cmocka_run_one_test_or_fixture <null>
#5 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
Location is heap block of size 16384 at 0x000000000009 allocated by main thread:
#0 calloc <null>
#1 <null> <null>
#2 send_test lib/dns/tests/dnstap_test.c:176:11
#3 cmocka_run_one_test_or_fixture <null>
#4 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
Thread T2 (running) created by main thread at:
#0 pthread_create <null>
#1 fstrm_iothr_init <null>
#2 send_test lib/dns/tests/dnstap_test.c:176:11
#3 cmocka_run_one_test_or_fixture <null>
#4 __libc_start_main /build/glibc-vjB4T2/glibc-2.28/csu/../csu/libc-start.c:308:16
SUMMARY: ThreadSanitizer: data race in memcpy