From c075bd85a882ff7d41cab16b449c72e364a965ac Mon Sep 17 00:00:00 2001 From: synqa Date: Sat, 14 Feb 2026 22:42:48 +0900 Subject: [PATCH] Add ThreadSanitizer suppression file Using no_sanitize("thread") disables instrumentation for the entire stack frame, meaning functions called within that scope are also not checked. By using race_top in a suppression file, we can suppress erros only when they occur at the top of the stack. This provides more granular control over errors suppression. As an example, this suppression addresses #2222. --- tsan_suppressions.txt | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tsan_suppressions.txt diff --git a/tsan_suppressions.txt b/tsan_suppressions.txt new file mode 100644 index 00000000..bc2943fa --- /dev/null +++ b/tsan_suppressions.txt @@ -0,0 +1,12 @@ +# This file contains suppressions for Thread Sanitizer. +# For the specification, refer to: https://github.com/google/sanitizers/wiki/threadsanitizersuppressions + + +# Thread Sanitizer reports data races on Finished and NoDelayFlag in CONNECT_SERIAL_PARAM, +# shared between BindConnectThreadForIPv4, BindConnectThreadForIPv6, and BindConnectEx5. +# These are benign data races: the Set/Wait on FinishEvent provides synchronization +# equivalent to a lock, but TSan cannot recognize it. +# https://github.com/SoftEtherVPN/SoftEtherVPN/pull/2222 +race_top:BindConnectThreadForIPv4 +race_top:BindConnectThreadForIPv6 +race_top:BindConnectEx5