mirror of
https://github.com/git/git.git
synced 2026-06-24 08:48:31 +00:00
Currently, transfer_debug() lazily initializes a static variable based on GIT_TRANSLOOP_DEBUG. Since the function may be called from multiple worker threads, this initialization is racy and is therefore suppressed in .tsan-suppressions. Initialize the variable in bidirectional_transfer_loop() before any worker threads or processes are created. This patch removes the race and allows dropping the corresponding TSAN suppression. Signed-off-by: Pushkar Singh <pushkarkumarsingh1970@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 lines
667 B
Plaintext
16 lines
667 B
Plaintext
# Suppressions for ThreadSanitizer (tsan).
|
|
#
|
|
# This file is used by setting the environment variable TSAN_OPTIONS to, e.g.,
|
|
# "suppressions=$(pwd)/.tsan-suppressions". Observe that relative paths such as
|
|
# ".tsan-suppressions" might not work.
|
|
|
|
# A static variable is written to racily, but we always write the same value, so
|
|
# in practice it (hopefully!) doesn't matter.
|
|
race:^want_color$
|
|
|
|
# A boolean value, which tells whether the replace_map has been initialized or
|
|
# not, is read racily with an update. As this variable is written to only once,
|
|
# and it's OK if the value change right after reading it, this shouldn't be a
|
|
# problem.
|
|
race:^lookup_replace_object$
|