write after free in unit test lib/ns/tests/query_test.c
d94dce78c1c4ece876df4f4bd/d476cf377bb844d8f3326c180f2658115041457349f68994da30f5aa0b03b7f3.tsan
WARNING: ThreadSanitizer: heap-use-after-free
Write of size 8 at 0x000000000001 by main thread:
#0 __wrap_isc_nmhandle_detach lib/ns/tests/nstest.c:125:11
#1 ns_test_qctx_destroy lib/ns/tests/nstest.c:874:3
#2 run_sfcache_test lib/ns/tests/query_test.c:163:2
#3 ns__query_sfcache_test lib/ns/tests/query_test.c:245:3
#4 <null> <null>
#5 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16
Previous write of size 8 at 0x000000000001 by main thread (mutexes: write M1):
#0 free <null>
#1 default_memfree lib/isc/mem.c:742:2
#2 mem_put lib/isc/mem.c:654:2
#3 isc___mem_put lib/isc/mem.c:1110:3
#4 isc__mem_put lib/isc/mem.c:2439:2
#5 __wrap_isc_nmhandle_detach lib/ns/tests/nstest.c:122:3
#6 ns_test_qctx_destroy lib/ns/tests/nstest.c:874:3
#7 run_sfcache_test lib/ns/tests/query_test.c:163:2
#8 ns__query_sfcache_test lib/ns/tests/query_test.c:245:3
#9 <null> <null>
#10 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16
Mutex M1 (0x000000000014) created at:
#0 pthread_mutex_init <null>
#1 isc__mutex_init lib/isc/pthreads/mutex.c:288:8
#2 mem_create lib/isc/mem.c:765:2
#3 isc_mem_create lib/isc/mem.c:2425:2
#4 ns_test_begin lib/ns/tests/nstest.c:303:2
#5 _setup lib/ns/tests/query_test.c:43:11
#6 <null> <null>
#7 __libc_start_main /build/glibc-vjB4T1/glibc-2.28/csu/../csu/libc-start.c:308:16
SUMMARY: ThreadSanitizer: heap-use-after-free lib/ns/tests/nstest.c:125:11 in __wrap_isc_nmhandle_detach