When isc_nmhandle_t gets deactivated, it could be just put onto array
stack to be reused later to safe some initialization time.
Unfortunately, this might hide some use-after-free errors.
Disable the inactive handles caching when compiled with Address or
Thread Sanitizer.
(cherry picked from commit
92cce1da6571f9fe4b904667c822ab8ff0ebe4b2)
INSIST(atomic_fetch_sub(&sock->ah, 1) > 0);
+#if !__SANITIZE_ADDRESS__ && !__SANITIZE_THREAD__
if (atomic_load(&sock->active)) {
reuse = isc_astack_trypush(sock->inactivehandles, handle);
}
+#endif /* !__SANITIZE_ADDRESS__ && !__SANITIZE_THREAD__ */
if (!reuse) {
nmhandle_free(sock, handle);
}