Commit 2b551df
transport-helper: fix TSAN race in transfer_debug()
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>1 parent a89346e commit 2b551df
2 files changed
Lines changed: 6 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | 10 | | |
12 | 11 | | |
13 | 12 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1343 | 1343 | | |
1344 | 1344 | | |
1345 | 1345 | | |
| 1346 | + | |
| 1347 | + | |
1346 | 1348 | | |
1347 | 1349 | | |
1348 | 1350 | | |
1349 | 1351 | | |
1350 | | - | |
1351 | | - | |
1352 | | - | |
1353 | | - | |
1354 | | - | |
1355 | | - | |
1356 | | - | |
1357 | 1352 | | |
1358 | 1353 | | |
1359 | | - | |
1360 | 1354 | | |
1361 | | - | |
1362 | | - | |
1363 | | - | |
| 1355 | + | |
1364 | 1356 | | |
1365 | 1357 | | |
1366 | 1358 | | |
| |||
1630 | 1622 | | |
1631 | 1623 | | |
1632 | 1624 | | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
1633 | 1628 | | |
1634 | 1629 | | |
1635 | 1630 | | |
| |||
0 commit comments