From a247e3ecdc2ea0d13dcd9d3d499f1bbaa0ba0f6f Mon Sep 17 00:00:00 2001 From: synqa Date: Mon, 23 Feb 2026 17:00:35 +0900 Subject: [PATCH] Suppress Thread Sanitizer for Accept and Disconnect Thread Sanitizer reports two data races on CancelAccept and CallingThread in SOCK, shared between Accept(Accept6) and Disconnect. These are used when interrupting an Accept operation from a Disconnect. These races are benign because they work correctly even if both fields have old values. --- tsan_suppressions.txt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tsan_suppressions.txt b/tsan_suppressions.txt index 6719eb91..4cbcddc7 100644 --- a/tsan_suppressions.txt +++ b/tsan_suppressions.txt @@ -22,6 +22,16 @@ race_top:BindConnectEx5 # WaitThread simply returns. race_top:ThreadPoolProc + +## Accept/Disconnect cancellation +# Thread Sanitizer reports two data races on CancelAccept and CallingThread in SOCK, shared between +# Accept(Accept6) and Disconnect. These are used when interrupting an Accept operation from a Disconnect. +# They are race-safe because they work correctly even if both fields have old values. +race_top:^Accept$ +race_top:^Accept6$ +race_top:^Disconnect$ + + ## Manual PTHREAD_MUTEX_RECURSIVE # The Lock/Unlock mechanism on Unix is a manual, hand-coded implementation of PTHREAD_MUTEX_RECURSIVE. # We avoid using the PTHREAD_MUTEX_RECURSIVE directly because it exhibits critical bugs, such as deadlocks